Skip to content

Commit

Permalink
Wrap the parameters in an "IN" or "NOT IN" clause.
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed May 9, 2016
1 parent 4ae3cf1 commit c69cae3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions models/Query/Grammars/OracleGrammar.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ component displayname='OracleGrammar' implements='Quick.models.Query.Grammars.Gr
return '';
}

var placeholder = '?';
if (where.operator == 'in' || where.operator == 'not in') {
placeholder = '(#placeholder#)';
}

if (index == 1) {
return '#where.column# #UCase(where.operator)# ?';
return '#where.column# #UCase(where.operator)# #placeholder#';
}

return '#uCase(where.combinator)# #where.column# #UCase(where.operator)# ?';
return '#uCase(where.combinator)# #where.column# #UCase(where.operator)# #placeholder#';
});

whereStatements = ArrayFilter(whereStatements, function(statement) {
Expand Down

0 comments on commit c69cae3

Please sign in to comment.