@@ -77,7 +77,7 @@ component
77
77
* @return qb.models.Query.QueryBuilder
78
78
*/
79
79
public QuickQB function fromSub ( required string alias , required any input ) {
80
- if ( structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
80
+ if ( isStruct ( arguments . input ) && structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
81
81
arguments .input = arguments .input .getQB ();
82
82
}
83
83
@@ -110,7 +110,7 @@ component
110
110
string type = " inner" ,
111
111
boolean where = false
112
112
) {
113
- if ( structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
113
+ if ( isStruct ( arguments . input ) && structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
114
114
arguments .input = arguments .input .getQB ();
115
115
}
116
116
@@ -133,7 +133,7 @@ component
133
133
query ,
134
134
combinator = " and"
135
135
) {
136
- if ( structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
136
+ if ( isStruct ( arguments . query ) && structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
137
137
arguments .query = arguments .query .getQB ();
138
138
}
139
139
@@ -149,7 +149,7 @@ component
149
149
* @return qb.models.Query.QueryBuilder
150
150
*/
151
151
public QuickQB function orderBySub ( required any query , string direction = " asc" ) {
152
- if ( structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
152
+ if ( isStruct ( arguments . query ) && structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
153
153
arguments .query = arguments .query .getQB ();
154
154
}
155
155
@@ -169,7 +169,7 @@ component
169
169
* @return qb.models.Query.QueryBuilder
170
170
*/
171
171
public QuickQB function crossJoinSub ( required any alias , required any input ) {
172
- if ( structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
172
+ if ( isStruct ( arguments . input ) && structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
173
173
arguments .input = arguments .input .getQB ();
174
174
}
175
175
@@ -190,7 +190,7 @@ component
190
190
combinator = " and" ,
191
191
negate = false
192
192
) {
193
- if ( structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
193
+ if ( isStruct ( arguments . query ) && structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
194
194
arguments .query = arguments .query .getQB ();
195
195
}
196
196
@@ -235,7 +235,7 @@ component
235
235
* @return qb.models.Query.QueryBuilder
236
236
*/
237
237
public QueryBuilder function union ( required any input , boolean all = false ) {
238
- if ( structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
238
+ if ( isStruct ( arguments . input ) && structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
239
239
arguments .input = arguments .input .getQB ();
240
240
}
241
241
@@ -258,7 +258,7 @@ component
258
258
array columns = [],
259
259
boolean recursive = false
260
260
) {
261
- if ( structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
261
+ if ( isStruct ( arguments . input ) && structKeyExists ( arguments .input , " isQuickBuilder" ) ) {
262
262
arguments .input = arguments .input .getQB ();
263
263
}
264
264
@@ -282,7 +282,7 @@ component
282
282
struct options = {},
283
283
boolean toSql = false
284
284
) {
285
- if ( structKeyExists ( arguments .source , " isQuickBuilder" ) ) {
285
+ if ( isStruct ( arguments . source ) && structKeyExists ( arguments .source , " isQuickBuilder" ) ) {
286
286
arguments .source = arguments .source .getQB ();
287
287
}
288
288
@@ -306,7 +306,7 @@ component
306
306
boolean toSql = false
307
307
) {
308
308
for ( var key in arguments .values ) {
309
- if ( structKeyExists ( arguments .values [ key ], " isQuickBuilder" ) ) {
309
+ if ( isStruct ( arguments . values [ key ] ) && structKeyExists ( arguments .values [ key ], " isQuickBuilder" ) ) {
310
310
arguments .values [ key ] = arguments .values [ key ].getQb ();
311
311
}
312
312
}
@@ -323,7 +323,12 @@ component
323
323
struct options = {},
324
324
boolean toSql = false
325
325
) {
326
- if ( ! isNull ( arguments .source ) && structKeyExists ( arguments .source , " isQuickBuilder" ) ) {
326
+ if (
327
+ ! isNull ( arguments .source ) && isStruct ( arguments .source ) && structKeyExists (
328
+ arguments .source ,
329
+ " isQuickBuilder"
330
+ )
331
+ ) {
327
332
arguments .source = arguments .source .getQB ();
328
333
}
329
334
@@ -339,7 +344,7 @@ component
339
344
* @return s qb.models.Query.QueryBuilder
340
345
*/
341
346
public QueryBuilder function subSelect ( required string alias , required any query ) {
342
- if ( structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
347
+ if ( isStruct ( arguments . query ) && structKeyExists ( arguments .query , " isQuickBuilder" ) ) {
343
348
arguments .query = arguments .query .getQB ();
344
349
}
345
350
@@ -361,7 +366,7 @@ component
361
366
negate = false
362
367
) {
363
368
if (
364
- ! isClosure ( arguments .query ) && ! isCustomFunction ( arguments .query ) && structKeyExists (
369
+ ! isClosure ( arguments .query ) && ! isCustomFunction ( arguments .query ) && isStruct ( arguments . query ) && structKeyExists (
365
370
arguments .query ,
366
371
" isQuickBuilder"
367
372
)
0 commit comments