Skip to content

Commit

Permalink
[5.6] Add missing PostgreSQL operators (#23945)
Browse files Browse the repository at this point in the history
Adds the operators "not ilike", "is distinct from", and
"is not distinct from" to the Postgres query grammar. Backwards
compatible.

https://www.postgresql.org/docs/10/static/functions-comparison.html#FUNCTIONS-COMPARISON-PRED-TABLE
  • Loading branch information
Jesse Denardo authored and taylorotwell committed Apr 25, 2018
1 parent 49977b8 commit bfa0312
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ class PostgresGrammar extends Grammar
*/
protected $operators = [
'=', '<', '>', '<=', '>=', '<>', '!=',
'like', 'not like', 'ilike',
'like', 'not like', 'ilike', 'not ilike',
'&', '|', '#', '<<', '>>', '>>=', '=<<',
'&&', '@>', '<@', '?', '?|', '?&', '||', '-', '-', '#-',
'is distinct from', 'is not distinct from',
];

/**
Expand Down

0 comments on commit bfa0312

Please sign in to comment.