Skip to content

Conditional INSERT with parameterization #390

Open

Description

@marshallford

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions