@@ -15,12 +15,17 @@ class Query
1515 public const TYPE_GREATER = 'greaterThan ' ;
1616 public const TYPE_GREATER_EQUAL = 'greaterThanEqual ' ;
1717 public const TYPE_CONTAINS = 'contains ' ;
18+ public const TYPE_NOT_CONTAINS = 'notContains ' ;
1819 public const TYPE_SEARCH = 'search ' ;
20+ public const TYPE_NOT_SEARCH = 'notSearch ' ;
1921 public const TYPE_IS_NULL = 'isNull ' ;
2022 public const TYPE_IS_NOT_NULL = 'isNotNull ' ;
2123 public const TYPE_BETWEEN = 'between ' ;
24+ public const TYPE_NOT_BETWEEN = 'notBetween ' ;
2225 public const TYPE_STARTS_WITH = 'startsWith ' ;
26+ public const TYPE_NOT_STARTS_WITH = 'notStartsWith ' ;
2327 public const TYPE_ENDS_WITH = 'endsWith ' ;
28+ public const TYPE_NOT_ENDS_WITH = 'notEndsWith ' ;
2429
2530 public const TYPE_SELECT = 'select ' ;
2631
@@ -48,12 +53,17 @@ class Query
4853 self ::TYPE_GREATER ,
4954 self ::TYPE_GREATER_EQUAL ,
5055 self ::TYPE_CONTAINS ,
56+ self ::TYPE_NOT_CONTAINS ,
5157 self ::TYPE_SEARCH ,
58+ self ::TYPE_NOT_SEARCH ,
5259 self ::TYPE_IS_NULL ,
5360 self ::TYPE_IS_NOT_NULL ,
5461 self ::TYPE_BETWEEN ,
62+ self ::TYPE_NOT_BETWEEN ,
5563 self ::TYPE_STARTS_WITH ,
64+ self ::TYPE_NOT_STARTS_WITH ,
5665 self ::TYPE_ENDS_WITH ,
66+ self ::TYPE_NOT_ENDS_WITH ,
5767 self ::TYPE_SELECT ,
5868 self ::TYPE_ORDER_DESC ,
5969 self ::TYPE_ORDER_ASC ,
@@ -206,7 +216,9 @@ public static function isMethod(string $value): bool
206216 self ::TYPE_GREATER ,
207217 self ::TYPE_GREATER_EQUAL ,
208218 self ::TYPE_CONTAINS ,
219+ self ::TYPE_NOT_CONTAINS ,
209220 self ::TYPE_SEARCH ,
221+ self ::TYPE_NOT_SEARCH ,
210222 self ::TYPE_ORDER_ASC ,
211223 self ::TYPE_ORDER_DESC ,
212224 self ::TYPE_LIMIT ,
@@ -216,8 +228,11 @@ public static function isMethod(string $value): bool
216228 self ::TYPE_IS_NULL ,
217229 self ::TYPE_IS_NOT_NULL ,
218230 self ::TYPE_BETWEEN ,
231+ self ::TYPE_NOT_BETWEEN ,
219232 self ::TYPE_STARTS_WITH ,
233+ self ::TYPE_NOT_STARTS_WITH ,
220234 self ::TYPE_ENDS_WITH ,
235+ self ::TYPE_NOT_ENDS_WITH ,
221236 self ::TYPE_OR ,
222237 self ::TYPE_AND ,
223238 self ::TYPE_SELECT => true ,
@@ -429,6 +444,18 @@ public static function contains(string $attribute, array $values): self
429444 return new self (self ::TYPE_CONTAINS , $ attribute , $ values );
430445 }
431446
447+ /**
448+ * Helper method to create Query with notContains method
449+ *
450+ * @param string $attribute
451+ * @param array<mixed> $values
452+ * @return Query
453+ */
454+ public static function notContains (string $ attribute , array $ values ): self
455+ {
456+ return new self (self ::TYPE_NOT_CONTAINS , $ attribute , $ values );
457+ }
458+
432459 /**
433460 * Helper method to create Query with between method
434461 *
@@ -442,6 +469,19 @@ public static function between(string $attribute, string|int|float|bool $start,
442469 return new self (self ::TYPE_BETWEEN , $ attribute , [$ start , $ end ]);
443470 }
444471
472+ /**
473+ * Helper method to create Query with notBetween method
474+ *
475+ * @param string $attribute
476+ * @param string|int|float|bool $start
477+ * @param string|int|float|bool $end
478+ * @return Query
479+ */
480+ public static function notBetween (string $ attribute , string |int |float |bool $ start , string |int |float |bool $ end ): self
481+ {
482+ return new self (self ::TYPE_NOT_BETWEEN , $ attribute , [$ start , $ end ]);
483+ }
484+
445485 /**
446486 * Helper method to create Query with search method
447487 *
@@ -454,6 +494,18 @@ public static function search(string $attribute, string $value): self
454494 return new self (self ::TYPE_SEARCH , $ attribute , [$ value ]);
455495 }
456496
497+ /**
498+ * Helper method to create Query with notSearch method
499+ *
500+ * @param string $attribute
501+ * @param string $value
502+ * @return Query
503+ */
504+ public static function notSearch (string $ attribute , string $ value ): self
505+ {
506+ return new self (self ::TYPE_NOT_SEARCH , $ attribute , [$ value ]);
507+ }
508+
457509 /**
458510 * Helper method to create Query with select method
459511 *
@@ -558,11 +610,21 @@ public static function startsWith(string $attribute, string $value): self
558610 return new self (self ::TYPE_STARTS_WITH , $ attribute , [$ value ]);
559611 }
560612
613+ public static function notStartsWith (string $ attribute , string $ value ): self
614+ {
615+ return new self (self ::TYPE_NOT_STARTS_WITH , $ attribute , [$ value ]);
616+ }
617+
561618 public static function endsWith (string $ attribute , string $ value ): self
562619 {
563620 return new self (self ::TYPE_ENDS_WITH , $ attribute , [$ value ]);
564621 }
565622
623+ public static function notEndsWith (string $ attribute , string $ value ): self
624+ {
625+ return new self (self ::TYPE_NOT_ENDS_WITH , $ attribute , [$ value ]);
626+ }
627+
566628 /**
567629 * @param array<Query> $queries
568630 * @return Query
0 commit comments