@@ -32,6 +32,10 @@ class Query
3232 public const TYPE_NOT_CROSSES = 'notCrosses ' ;
3333 public const TYPE_DISTANCE = 'distance ' ;
3434 public const TYPE_NOT_DISTANCE = 'notDistance ' ;
35+ public const TYPE_DISTANCE_GREATER_THAN = 'distanceGreaterThan ' ;
36+ public const TYPE_DISTANCE_LESS_THAN = 'distanceLessThan ' ;
37+ public const TYPE_NOT_DISTANCE_GREATER_THAN = 'notDistanceGreaterThan ' ;
38+ public const TYPE_NOT_DISTANCE_LESS_THAN = 'notDistanceLessThan ' ;
3539 public const TYPE_INTERSECTS = 'intersects ' ;
3640 public const TYPE_NOT_INTERSECTS = 'notIntersects ' ;
3741 public const TYPE_OVERLAPS = 'overlaps ' ;
@@ -80,6 +84,10 @@ class Query
8084 self ::TYPE_NOT_CROSSES ,
8185 self ::TYPE_DISTANCE ,
8286 self ::TYPE_NOT_DISTANCE ,
87+ self ::TYPE_DISTANCE_GREATER_THAN ,
88+ self ::TYPE_DISTANCE_LESS_THAN ,
89+ self ::TYPE_NOT_DISTANCE_GREATER_THAN ,
90+ self ::TYPE_NOT_DISTANCE_LESS_THAN ,
8391 self ::TYPE_INTERSECTS ,
8492 self ::TYPE_NOT_INTERSECTS ,
8593 self ::TYPE_OVERLAPS ,
@@ -283,6 +291,10 @@ public function isSpatialQuery(): bool
283291 self ::TYPE_NOT_CROSSES ,
284292 self ::TYPE_DISTANCE ,
285293 self ::TYPE_NOT_DISTANCE ,
294+ self ::TYPE_DISTANCE_GREATER_THAN ,
295+ self ::TYPE_DISTANCE_LESS_THAN ,
296+ self ::TYPE_NOT_DISTANCE_GREATER_THAN ,
297+ self ::TYPE_NOT_DISTANCE_LESS_THAN ,
286298 self ::TYPE_INTERSECTS ,
287299 self ::TYPE_NOT_INTERSECTS ,
288300 self ::TYPE_OVERLAPS ,
@@ -913,6 +925,54 @@ public static function notDistance(string $attribute, array $values): self
913925 return new self (self ::TYPE_NOT_DISTANCE , $ attribute , $ values );
914926 }
915927
928+ /**
929+ * Helper method to create Query with distanceGreaterThan method
930+ *
931+ * @param string $attribute
932+ * @param array<mixed> $values
933+ * @return Query
934+ */
935+ public static function distanceGreaterThan (string $ attribute , array $ values ): self
936+ {
937+ return new self (self ::TYPE_DISTANCE_GREATER_THAN , $ attribute , $ values );
938+ }
939+
940+ /**
941+ * Helper method to create Query with distanceLessThan method
942+ *
943+ * @param string $attribute
944+ * @param array<mixed> $values
945+ * @return Query
946+ */
947+ public static function distanceLessThan (string $ attribute , array $ values ): self
948+ {
949+ return new self (self ::TYPE_DISTANCE_LESS_THAN , $ attribute , $ values );
950+ }
951+
952+ /**
953+ * Helper method to create Query with notDistanceGreaterThan method
954+ *
955+ * @param string $attribute
956+ * @param array<mixed> $values
957+ * @return Query
958+ */
959+ public static function notDistanceGreaterThan (string $ attribute , array $ values ): self
960+ {
961+ return new self (self ::TYPE_NOT_DISTANCE_GREATER_THAN , $ attribute , $ values );
962+ }
963+
964+ /**
965+ * Helper method to create Query with notDistanceLessThan method
966+ *
967+ * @param string $attribute
968+ * @param array<mixed> $values
969+ * @return Query
970+ */
971+ public static function notDistanceLessThan (string $ attribute , array $ values ): self
972+ {
973+ return new self (self ::TYPE_NOT_DISTANCE_LESS_THAN , $ attribute , $ values );
974+ }
975+
916976 /**
917977 * Helper method to create Query with intersects method
918978 *
0 commit comments