Class holding data to alter some table with single AlterTableStatement
Sum-type to represent some statement
Class holding all information about Redshift's column
Class holding all information about Redshift's column
column_name
data_type such as INTEGER, VARCHAR, etc
set of column_attributes such as ENCODE
set of column_constraints such as NOT NULL
column_attributes are: [ DEFAULT default_expr ] [ IDENTITY ( seed, step ) ] [ ENCODE encoding ] [ DISTKEY ] [ SORTKEY ]
column_constraints are: [ { NOT NULL | NULL } ] [ { UNIQUE | PRIMARY KEY } ] [ REFERENCES reftable [ ( refcolumn ) ] ]
Class representing comment block in Ddl file Can be rendered into file along with other Ddl-statements
Class representing comment block in Ddl file Can be rendered into file along with other Ddl-statements
sequence of lines
optional amount of spaces to prepend delimiter (--)
COMMENT ON { TABLE object_name | COLUMN object_name.column_name | CONSTRAINT constraint_name ON table_name | DATABASE object_name | VIEW object_name } IS 'text'
Compression encodings http://docs.aws.amazon.com/redshift/latest/dg/c_Compression_encodings.html
Class holding all information about Redshift's table
Class holding all information about Redshift's table
table_name
iterable of all columns DDLs
set of table_constraints such as PRIMARY KEY
set of table_attributes such as DISTSTYLE
Data types http://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html
Base class for everything that can be represented as Redshift DDL
These predefined data types assembles into usual Redshift data types, but can store additional information such as warnings.
These predefined data types assembles into usual Redshift data types, but can store additional information such as warnings. Using to prevent output on DDL-generation step.
Reference table.
Reference table. Used in foreign key and table constraint
name of table
optional column
Trait for *independent* SQL DDL statements.
Trait for *independent* SQL DDL statements. Unlike simple Ddl objects, these can be used as stand-alone commands and be content of file. We're always using semicolon in the end of statements
table_attributes are: [ DISTSTYLE { EVEN | KEY | ALL } ] [ DISTKEY ( column_name ) ] [ [COMPOUND | INTERLEAVED ] SORTKEY ( column_name [, ...] ) ]
table_constraints are: [ UNIQUE ( column_name [, ...
table_constraints are: [ UNIQUE ( column_name [, ... ] ) ] [ PRIMARY KEY ( column_name [, ... ] ) ] [ FOREIGN KEY (column_name [, ... ] ) REFERENCES reftable [ ( refcolumn ) ]
Class holding data to alter some table with single AlterTableStatement
http://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html ALTER TABLE table_name { ADD table_constraint | DROP CONSTRAINT constraint_name [ RESTRICT | CASCADE ] | OWNER TO new_owner | RENAME TO new_name | RENAME COLUMN column_name TO new_name | ADD [ COLUMN ] column_name column_type [ DEFAULT default_expr ] [ ENCODE encoding ] [ NOT NULL | NULL ] | DROP [ COLUMN ] column_name [ RESTRICT | CASCADE ] } where table_constraint is: [ CONSTRAINT constraint_name ] { UNIQUE ( column_name [, ... ] ) | PRIMARY KEY ( column_name [, ... ] ) | FOREIGN KEY (column_name [, ... ] ) REFERENCES reftable [ ( refcolumn ) ]}