rdesantis / hauldata

Database Process Automation made easy.
Apache License 2.0
1 stars 0 forks source link

Support TABLE literals #136

Closed rdesantis closed 4 years ago

rdesantis commented 4 years ago

A table literal is enclosed in square brackets. That allows syntax like this:

VARIABLE x TABLE; SET x = [(1, 2, 3), (4, 5, 6)];

rdesantis commented 4 years ago

Instead of introducing a completely new syntax element of square brackets, implemented a new table-valued function VALUES() which takes a literal as its argument:

DECLARE x TABLE = VALUES((1, 2, 3), (4, 5, 6));

Implemented per https://github.com/rdesantis/hauldata/commit/d38153aa99e7f01ba53538f48dc82e7b0a2d7705