Skip to content

Commit

Permalink
Added ilike condition to QueryBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Nov 23, 2016
1 parent d3756e4 commit 27ca6fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function buildCondition($condition)
'in' => 'buildInCondition',
'ni' => 'buildNotInCondition',
'like' => 'buildLikeCondition',
'ilike' => 'buildIlikeCondition',
'gt' => 'buildCompareCondition',
'ge' => 'buildCompareCondition',
'lt' => 'buildCompareCondition',
Expand Down Expand Up @@ -149,6 +150,11 @@ private function buildLikeCondition($operator, $operands)
return [$operands[0] . '_like' => $operands[1]];
}

private function buildIlikeCondition($operator, $operands)
{
return [$operands[0] . '_ilike' => $operands[1]];
}

private function buildCompareCondition($operator, $operands)
{
if (!isset($operands[0], $operands[1])) {
Expand Down

0 comments on commit 27ca6fe

Please sign in to comment.