Skip to content
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

Conditional INSERT with parameterization #390

Open
marshallford opened this issue Feb 25, 2018 · 0 comments
Open

Conditional INSERT with parameterization #390

marshallford opened this issue Feb 25, 2018 · 0 comments

Comments

@marshallford
Copy link

How might I pull off something like this? I have something similar to this "working" in a hacky way but the values passed to select function are not parameterized and are not wrapped with quotes.

Input:

{
  colName: 'foo',
  colName2: 'bar'
}
INSERT INTO tableName (col_name, col_name2)
SELECT $1, $2
WHERE EXISTS (SUB_QUERY_HERE)
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

1 participant