@@ -175,7 +175,6 @@ const prepWhere = ({ alias, where = {}, parent = null, junction = 'and', values,
175
175
sqlParts . push ( prepWhere ( { alias, where : val , parent : key , junction, values, encryption, ctx } ) )
176
176
}
177
177
178
- console . log ( 'sql parts generated' , sqlParts )
179
178
return sqlParts . filter ( Boolean ) . join ( junctions [ junction ] )
180
179
}
181
180
@@ -426,7 +425,7 @@ const prepIf = ({ alias, val, junction = 'and', values, encryption = undefined,
426
425
@returns {{sql:string, values:Array} } 'sql' with placeholder string and 'values' array to be injected at execution
427
426
*/
428
427
const prepCase = ( { alias, val, junction = 'and' , values, encryption = undefined , ctx = undefined } ) => {
429
- const { check = [ ] , else : defaultElse , as = null } = val
428
+ const { check = [ ] , else : defaultElse , cast = null , as = null } = val
430
429
const conditionalPlaceholders = check . map ( condition => {
431
430
const { when, then } = condition
432
431
const whenPlaceholder = handlePlaceholder ( { alias, value : when , junction, values, encryption, ctx } )
0 commit comments