@@ -90,7 +90,7 @@ protected function getQueryColumns(array $columns) : string
90
90
91
91
protected function getTypeClause ($ where ) : string
92
92
{
93
- $ type =in_array ($ where ['type ' ], ['In ' , 'Null ' , 'NotNull ' ])
93
+ $ type =in_array ($ where ['type ' ], ['In ' , 'Null ' , 'NotNull ' , ' between ' ])
94
94
? strtolower ($ where ['type ' ])
95
95
: strtolower ($ where ['operator ' ]);
96
96
@@ -99,9 +99,19 @@ protected function getTypeClause($where) : string
99
99
100
100
protected function getValuesClause (array $ where = null ) : string
101
101
{
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 ' ])
104
108
: '' ;
109
+
110
+ if (! $ values && $ this ->query ->bindings ['where ' ] ?? false ) {
111
+ $ values = implode ('_ ' , $ this ->query ->bindings ['where ' ]);
112
+ }
113
+
114
+ return '_ ' . $ values ;
105
115
}
106
116
107
117
protected function getWhereClauses (array $ wheres = []) : string
@@ -152,7 +162,6 @@ protected function getOtherClauses(array $where, string $carry = null) : string
152
162
}
153
163
154
164
$ value = $ this ->getTypeClause ($ where );
155
- $ value .= "_ " . array_get ($ where , 'value ' );
156
165
$ value .= $ this ->getValuesClause ($ where );
157
166
158
167
return "{$ carry }- {$ where ['column ' ]}_ {$ value }" ;
0 commit comments