@@ -90,7 +90,7 @@ protected function getQueryColumns(array $columns) : string
9090
9191 protected function getTypeClause ($ where ) : string
9292 {
93- $ type =in_array ($ where ['type ' ], ['In ' , 'Null ' , 'NotNull ' ])
93+ $ type =in_array ($ where ['type ' ], ['In ' , 'Null ' , 'NotNull ' , ' between ' ])
9494 ? strtolower ($ where ['type ' ])
9595 : strtolower ($ where ['operator ' ]);
9696
@@ -99,9 +99,19 @@ protected function getTypeClause($where) : string
9999
100100 protected function getValuesClause (array $ where = null ) : string
101101 {
102- return is_array (array_get ($ where , 'values ' ))
103- ? '_ ' . implode ('_ ' , $ where ['values ' ])
102+ if (in_array ($ where ['type ' ], ['NotNull ' ])) {
103+ return '' ;
104+ }
105+
106+ $ values = is_array (array_get ($ where , 'values ' ))
107+ ? implode ('_ ' , $ where ['values ' ])
104108 : '' ;
109+
110+ if (! $ values && $ this ->query ->bindings ['where ' ] ?? false ) {
111+ $ values = implode ('_ ' , $ this ->query ->bindings ['where ' ]);
112+ }
113+
114+ return '_ ' . $ values ;
105115 }
106116
107117 protected function getWhereClauses (array $ wheres = []) : string
@@ -152,7 +162,6 @@ protected function getOtherClauses(array $where, string $carry = null) : string
152162 }
153163
154164 $ value = $ this ->getTypeClause ($ where );
155- $ value .= "_ " . array_get ($ where , 'value ' );
156165 $ value .= $ this ->getValuesClause ($ where );
157166
158167 return "{$ carry }- {$ where ['column ' ]}_ {$ value }" ;
0 commit comments