pub struct CreateTable {}Expand description
CREATE TABLE name (columns) or CREATE TABLE name AS query.
Exactly one of columns and query says what the table is. A column list is the ordinary form
and query is CREATE TABLE AS, where the columns come from what the query produced and the
only thing the syntax contributes is optionally renaming them, which is columns with the types
left as NONE.
Fields§
§name: SliceThe table name, as a run of Slice parts, outermost first.
columns: SliceThe column definitions, as a run of ColumnDef.
query: QueryRefThe AS query, or NONE.
if_not_exists: boolWhether IF NOT EXISTS was written.
or_replace: boolWhether OR REPLACE was written.
temporary: boolWhether TEMP or TEMPORARY was written.
keys: SliceThe column names of each PRIMARY KEY and UNIQUE, as a run of name lists in the order
they were written, whether on a column or on the table.
primary: u32Which of keys is the primary key, or NONE.
checks: SliceEvery CHECK expression, as a run of expressions in the order they were written, whether on
a column or on the table.
foreign: SliceThe columns of each FOREIGN KEY, as a run of name lists in the order written, whether on
a column or on the table.
foreign_tables: SliceThe table each of foreign references, as a run of name lists of its parts.
foreign_referenced: SliceThe referenced columns of each of foreign, as a run of name lists, an empty one when the
constraint named none and so means the referenced table’s primary key.
order: SliceEvery constraint in the order written, as a run of Constraint, which is the order the pin
lists them in. A NOT NULL a primary key implies is not here, since nobody wrote it.