Dependent on #58 and #62.
Oracle tables frequently contain IDENTITY columns, a popular feature used to implicitly create and use sequences.
Goal
The parse_table function shall understand identity columns and produce an appropriate AST.
As all sequence related syntax is shared with parse_sequence, there shall be no code duplication.
Examples
CREATE TABLE "HR"."TABLE_WITH_IDENTITY_ALWAYS"("ID" NUMBER(10,0) GENERATED ALWAYS AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE);
CREATE TABLE "HR"."TABLE_WITH_IDENTITY_BY_DEFAULT_ON_NULL"("ID" NUMBER(10,0) GENERATED BY DEFAULT ON NULL AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE);
CREATE TABLE "HR"."TABLE_WITH_IDENTITY_BY_DEFAULT"("ID" NUMBER(10,0) GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE);
CREATE TABLE "HR"."TABLE_WITH_IDENTITY"("ID" NUMBER(10,0) GENERATED ALWAYS AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE);
How to demo
Appropriate tests are created showcasing the resulting AST and AST accessors to iterate and inspect the table properties.
Dependent on #58 and #62.
Oracle tables frequently contain
IDENTITYcolumns, a popular feature used to implicitly create and use sequences.Goal
The
parse_tablefunction shall understand identity columns and produce an appropriate AST.As all sequence related syntax is shared with
parse_sequence, there shall be no code duplication.Examples
How to demo
Appropriate tests are created showcasing the resulting AST and AST accessors to iterate and inspect the table properties.