I'm trying to use a placeholder with a case expression, but it leaves the ? there:
> require('squel').case('"column" = ?', 'abc').when('true').then(123).toString()
'CASE "column" = ? WHEN (true) THEN 123 ELSE NULL END'
The docs say that the second parameter is an options object, so I also tried passing the placeholder value as the 3rd and 4th, neither of which made a difference.
It works fine in when (except for the auto-quoting, which is already covered in #330):
> require('squel').case('column').when('?', 'abc').then(123).toString()
'CASE column WHEN (\'abc\') THEN 123 ELSE NULL END'
I'm trying to use a placeholder with a case expression, but it leaves the
?
there:The docs say that the second parameter is an options object, so I also tried passing the placeholder value as the 3rd and 4th, neither of which made a difference.
It works fine in
when
(except for the auto-quoting, which is already covered in #330):