exasol / sql-statement-builder

Build SQL statements safely without string concatenation
MIT License
25 stars 4 forks source link

Support column references in value expressions #56

Closed redcatbear closed 4 years ago

redcatbear commented 4 years ago

Situation

Column references — i.e. names of columns in an expression — are valid value expressions. That means that a column reference can stand where a value expression is expected.

Example:

MERGE INTO ... AS ...
USING ... AS "SRC" ON ...
WHEN NOT MATCHED THEN INSERT ("ID", ...) VALUES ("SRC"."ID", ...)

In the example above the content of VALUES is a list of value expressions. Column references are useful in that scenario.

Acceptance Criteria

  1. Column references are accepted where value expressions are required.