pub struct CreateTable {
pub name: QualifiedName,
pub columns: Vec<Field>,
pub source: Option<Plan>,
pub if_not_exists: bool,
pub or_replace: bool,
pub keys: Vec<Key>,
pub defaults: Vec<Option<String>>,
pub sequences: Vec<QualifiedName>,
pub checks: Vec<String>,
pub foreign: Vec<ForeignKey>,
}Expand description
A bound CREATE TABLE.
Fields§
§name: QualifiedNameThe full name the table gets.
columns: Vec<Field>The columns, in order, with the types already resolved. For a CREATE TABLE AS these are
the query’s output types under whatever names the statement or the query gave them.
source: Option<Plan>The query to fill it from, for a CREATE TABLE AS.
if_not_exists: boolWhether an existing table of that name is left alone rather than being an error.
or_replace: boolWhether an existing table of that name is dropped first.
keys: Vec<Key>The primary key and the unique constraints, over the columns by place.
defaults: Vec<Option<String>>Each column’s DEFAULT as the SQL of its expression, or None for a column with none.
sequences: Vec<QualifiedName>The sequences the defaults use, which the table depends on.
checks: Vec<String>The SQL of each CHECK, in the order written.
foreign: Vec<ForeignKey>The foreign keys, in the order written.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CreateTable
impl !UnwindSafe for CreateTable
impl Freeze for CreateTable
impl Send for CreateTable
impl Sync for CreateTable
impl Unpin for CreateTable
impl UnsafeUnpin for CreateTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more