File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -591,6 +591,43 @@ public function notLike($cond = []): QueryBuilder
591591 return $ this ;
592592 }
593593
594+ /**
595+ * @param string $field
596+ * @return $this
597+ */
598+ public function isNull (string $ field ) {
599+ if (empty ($ field )) {
600+ $ this ->setError ('Empty $field in ' . __METHOD__ );
601+ return $ this ;
602+ }
603+
604+ $ this ->where ([[$ field , 'IS NULL ' ]]);
605+ return $ this ;
606+ }
607+
608+ /**
609+ * @param string $field
610+ * @return $this
611+ */
612+ public function isNotNull (string $ field ) {
613+ if (empty ($ field )) {
614+ $ this ->setError ('Empty $field in ' . __METHOD__ );
615+ return $ this ;
616+ }
617+
618+ $ this ->where ([[$ field , 'IS NOT NULL ' ]]);
619+ return $ this ;
620+ }
621+
622+ /**
623+ * @param string $field
624+ * @return $this
625+ */
626+ public function notNull (string $ field ) {
627+ $ this ->isNotNull ($ field );
628+ return $ this ;
629+ }
630+
594631 /**
595632 * @param int $limit
596633 * @return $this
You can’t perform that action at this time.
0 commit comments