Skip to content

Commit

Permalink
Added NotEq condition
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Nov 3, 2016
1 parent aceef15 commit ea50c04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public function buildCondition($condition)
'and' => 'buildAndCondition',
'between' => 'buildBetweenCondition',
'eq' => 'buildEqCondition',
'ne' => 'buildNotEqCondition',
'in' => 'buildInCondition',
'like' => 'buildLikeCondition',
'gt' => 'buildCompareCondition',
Expand Down Expand Up @@ -209,6 +210,13 @@ private function buildEqCondition($operator, $operands)
return [$key => reset($operands)];
}

private function buildNotEqCondition($operator, $operands)
{
$key = array_shift($operands);

return [$key . '_' . $operator => reset($operands)];
}

protected function buildCompositeInCondition($operator, $columns, $values)
{
throw new NotSupportedException('composite in is not supported by HiArt.');
Expand Down

0 comments on commit ea50c04

Please sign in to comment.