From 6ee33daebe70582f6a81b1652f222b3b78849698 Mon Sep 17 00:00:00 2001 From: Jack Kwakman Date: Wed, 4 Jul 2018 08:51:14 +0200 Subject: [PATCH 1/2] Added greater and less than functions. --- Query/QueryBuilder.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Query/QueryBuilder.php b/Query/QueryBuilder.php index 719f9355..841d5a7e 100644 --- a/Query/QueryBuilder.php +++ b/Query/QueryBuilder.php @@ -257,7 +257,7 @@ public function expression($value) return $this; } - + /** * {@inheritdoc} */ @@ -268,6 +268,15 @@ public function greaterThanEqual($value) return $this; } + /** + * {@inheritdoc} + */ + public function greaterThan($value) + { + $this->criteria = $this->criteria->greaterThan($value); + return $this; + } + /** * {@inheritdoc} */ @@ -278,6 +287,15 @@ public function lessThanEqual($value) return $this; } + /** + * {@inheritdoc} + */ + public function lessThan($value) + { + $this->criteria = $this->criteria->lessThan($value); + return $this; + } + /** * {@inheritdoc} */ @@ -311,4 +329,4 @@ public function getCriteria() { return $this->criteria; } -} \ No newline at end of file +} From 6599d89b75d52b07abc6f7905665ec842cef7d96 Mon Sep 17 00:00:00 2001 From: Jack Kwakman Date: Wed, 4 Jul 2018 09:01:21 +0200 Subject: [PATCH 2/2] Update QueryBuilderInterface.php Added gt and lt functions to Query Builder interface --- Query/QueryBuilderInterface.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Query/QueryBuilderInterface.php b/Query/QueryBuilderInterface.php index 41ff3d89..54d3dc32 100644 --- a/Query/QueryBuilderInterface.php +++ b/Query/QueryBuilderInterface.php @@ -161,6 +161,13 @@ public function getQuery(); */ public function greaterThanEqual($value); + /** + * @param string $value + * + * @return QueryBuilderInterface + */ + public function greaterThan($value); + /** * @param string $value * @@ -168,10 +175,17 @@ public function greaterThanEqual($value); */ public function lessThanEqual($value); + /** + * @param string $value + * + * @return QueryBuilderInterface + */ + public function lessThan($value); + /** * @param float $value * * @return QueryBuilderInterface */ public function boost($value); -} \ No newline at end of file +}