pub enum Statement {
Query(Box<Query>),
Insert {
table_name: ObjectName,
columns: Vec<Ident>,
source: Box<Query>,
},
Copy {
table_name: ObjectName,
columns: Vec<Ident>,
values: Vec<Option<String>>,
},
Update {
table_name: ObjectName,
assignments: Vec<Assignment>,
selection: Option<Expr>,
},
Delete {
table_name: ObjectName,
selection: Option<Expr>,
},
CreateView {
name: ObjectName,
columns: Vec<Ident>,
query: Box<Query>,
materialized: bool,
with_options: Vec<SqlOption>,
},
CreateTable {
if_not_exists: bool,
name: ObjectName,
columns: Vec<ColumnDef>,
constraints: Vec<TableConstraint>,
with_options: Vec<SqlOption>,
external: bool,
file_format: Option<FileFormat>,
location: Option<String>,
},
AlterTable {
name: ObjectName,
operation: AlterTableOperation,
},
Drop {
object_type: ObjectType,
if_exists: bool,
names: Vec<ObjectName>,
cascade: bool,
},
}
Expand description
A top-level statement (SELECT, INSERT, CREATE, etc.)
Variants§
Query(Box<Query>)
SELECT
Insert
INSERT
Fields
§
table_name: ObjectName
TABLE
Copy
Fields
§
table_name: ObjectName
TABLE
Update
UPDATE
Delete
DELETE
CreateView
CREATE VIEW
Fields
§
name: ObjectName
View name
CreateTable
CREATE TABLE
Fields
§
name: ObjectName
Table name
§
constraints: Vec<TableConstraint>
§
file_format: Option<FileFormat>
AlterTable
ALTER TABLE
Drop
DROP
Fields
§
object_type: ObjectType
The type of the object to drop: TABLE, VIEW, etc.
§
names: Vec<ObjectName>
One or more objects to drop. (ANSI SQL requires exactly one.)
Trait Implementations§
impl Eq for Statement
impl StructuralPartialEq for Statement
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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