Skip to content

Is it possible to achieve dynamic condition? #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ivanlauhk opened this issue Aug 5, 2020 · 1 comment
Closed

Is it possible to achieve dynamic condition? #104

ivanlauhk opened this issue Aug 5, 2020 · 1 comment

Comments

@ivanlauhk
Copy link

let d = { id: 1, someColumnName: 'someString' }

sql`SELECT * FROM table WHERE ${sql(d)}`

Is dynamic condition like above possible? I am in a situation in which I will be searching with different column names each time.

@porsager
Copy link
Owner

This is tracked in #12 and should hopefully be possible in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants