Skip to content

Commit

Permalink
Merge pull request #178 from jkwakman/jkwakman-gt-lt-query-builder
Browse files Browse the repository at this point in the history
Added greaterThan and lessThan functions
  • Loading branch information
floriansemm authored Jul 16, 2018
2 parents 4b63ad3 + 6599d89 commit 28b4342
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
22 changes: 20 additions & 2 deletions Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function expression($value)

return $this;
}

/**
* {@inheritdoc}
*/
Expand All @@ -268,6 +268,15 @@ public function greaterThanEqual($value)
return $this;
}

/**
* {@inheritdoc}
*/
public function greaterThan($value)
{
$this->criteria = $this->criteria->greaterThan($value);
return $this;
}

/**
* {@inheritdoc}
*/
Expand All @@ -278,6 +287,15 @@ public function lessThanEqual($value)
return $this;
}

/**
* {@inheritdoc}
*/
public function lessThan($value)
{
$this->criteria = $this->criteria->lessThan($value);
return $this;
}

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -311,4 +329,4 @@ public function getCriteria()
{
return $this->criteria;
}
}
}
16 changes: 15 additions & 1 deletion Query/QueryBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,31 @@ public function getQuery();
*/
public function greaterThanEqual($value);

/**
* @param string $value
*
* @return QueryBuilderInterface
*/
public function greaterThan($value);

/**
* @param string $value
*
* @return QueryBuilderInterface
*/
public function lessThanEqual($value);

/**
* @param string $value
*
* @return QueryBuilderInterface
*/
public function lessThan($value);

/**
* @param float $value
*
* @return QueryBuilderInterface
*/
public function boost($value);
}
}

0 comments on commit 28b4342

Please sign in to comment.