Skip to content

Commit

Permalink
fix: wrap strpos comparison in parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Feb 27, 2025
1 parent 836e658 commit 2477df5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/expr.ex
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,11 @@ defmodule AshSql.Expr do
%Fragment{
embedded?: pred_embedded?,
arguments: [
raw: "#{bindings.sql_behaviour.strpos_function()}((",
raw: "(#{bindings.sql_behaviour.strpos_function()}((",
expr: left,
raw: "), (",
expr: right,
raw: ")) > 0"
raw: ")) > 0)"
]
},
bindings,
Expand Down

0 comments on commit 2477df5

Please sign in to comment.