Skip to content

Commit

Permalink
Merge pull request #1 from glooby/starts-ends-with-filter-error
Browse files Browse the repository at this point in the history
Update QueryBuilder.php
  • Loading branch information
kilhage authored Mar 20, 2018
2 parents 27bae94 + fe4cc74 commit 6d16343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ private function addFilters(
$predicts[] = $expr->neq($field, $value);
break;
case Filter::STARTS:
$value = $expr->literal("%$value");
$value = $expr->literal("$value%");
$predicts[] = $expr->like($field, $value);
break;
case Filter::ENDS:
$value = $expr->literal("$value%");
$value = $expr->literal("%$value");
$predicts[] = $expr->like($field, $value);
break;
case Filter::CONTAINS:
Expand Down

0 comments on commit 6d16343

Please sign in to comment.