Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Feature request: Placeholders in the squel.case(...) expression? #362

Open
papandreou opened this issue Aug 1, 2018 · 0 comments
Open

Comments

@papandreou
Copy link

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'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant