pub enum Stmt {
Show 25 variants
AlterTable(QualifiedName, AlterTableBody),
Analyze(Option<QualifiedName>),
Attach {
expr: Expr,
db_name: Expr,
key: Option<Expr>,
},
Begin(Option<TransactionType>, Option<Name>),
Commit(Option<Name>),
CreateIndex {
unique: bool,
if_not_exists: bool,
idx_name: QualifiedName,
tbl_name: Name,
columns: Vec<SortedColumn>,
where_clause: Option<Expr>,
},
CreateTable {
temporary: bool,
if_not_exists: bool,
tbl_name: QualifiedName,
body: CreateTableBody,
},
CreateTrigger {
temporary: bool,
if_not_exists: bool,
trigger_name: QualifiedName,
time: Option<TriggerTime>,
event: TriggerEvent,
tbl_name: QualifiedName,
for_each_row: bool,
when_clause: Option<Expr>,
commands: Vec<TriggerCmd>,
},
CreateView {
temporary: bool,
if_not_exists: bool,
view_name: QualifiedName,
columns: Option<Vec<IndexedColumn>>,
select: Box<Select>,
},
CreateVirtualTable {
if_not_exists: bool,
tbl_name: QualifiedName,
module_name: Name,
args: Option<Vec<Box<str>>>,
},
Delete {
with: Option<With>,
tbl_name: QualifiedName,
indexed: Option<Indexed>,
where_clause: Option<Expr>,
returning: Option<Vec<ResultColumn>>,
order_by: Option<Vec<SortedColumn>>,
limit: Option<Limit>,
},
Detach(Expr),
DropIndex {
if_exists: bool,
idx_name: QualifiedName,
},
DropTable {
if_exists: bool,
tbl_name: QualifiedName,
},
DropTrigger {
if_exists: bool,
trigger_name: QualifiedName,
},
DropView {
if_exists: bool,
view_name: QualifiedName,
},
Insert {
with: Option<With>,
or_conflict: Option<ResolveType>,
tbl_name: QualifiedName,
columns: Option<DistinctNames>,
body: InsertBody,
returning: Option<Vec<ResultColumn>>,
},
Pragma(QualifiedName, Option<PragmaBody>),
Reindex {
obj_name: Option<QualifiedName>,
},
Release(Name),
Rollback {
tx_name: Option<Name>,
savepoint_name: Option<Name>,
},
Savepoint(Name),
Select(Box<Select>),
Update {
with: Option<With>,
or_conflict: Option<ResolveType>,
tbl_name: QualifiedName,
indexed: Option<Indexed>,
sets: Vec<Set>,
from: Option<FromClause>,
where_clause: Option<Expr>,
returning: Option<Vec<ResultColumn>>,
order_by: Option<Vec<SortedColumn>>,
limit: Option<Limit>,
},
Vacuum(Option<Name>, Option<Expr>),
}Expand description
SQL statement
Variants§
AlterTable(QualifiedName, AlterTableBody)
ALTER TABLE: table name, body
Analyze(Option<QualifiedName>)
ANALYSE: object name
Attach
ATTACH DATABASE
Begin(Option<TransactionType>, Option<Name>)
BEGIN: tx type, tx name
Commit(Option<Name>)
COMMIT/END: tx name
CreateIndex
CREATE INDEX
CreateTable
CREATE TABLE
CreateTrigger
CREATE TRIGGER
Fields
§
trigger_name: QualifiedNametrigger name
§
time: Option<TriggerTime>BEFORE/AFTER/INSTEAD OF
§
event: TriggerEventDELETE/INSERT/UPDATE
§
tbl_name: QualifiedNametable name
§
commands: Vec<TriggerCmd>statements
CreateView
CREATE VIEW
CreateVirtualTable
CREATE VIRTUAL TABLE
Fields
§
tbl_name: QualifiedNametable name
Delete
DELETE
Fields
§
tbl_name: QualifiedNameFROM table name
§
returning: Option<Vec<ResultColumn>>RETURNING
§
order_by: Option<Vec<SortedColumn>>ORDER BY
Detach(Expr)
DETACH DATABASE: db name
DropIndex
DROP INDEX
DropTable
DROP TABLE
DropTrigger
DROP TRIGGER
DropView
DROP VIEW
Insert
INSERT
Fields
§
or_conflict: Option<ResolveType>OR
§
tbl_name: QualifiedNametable name
§
columns: Option<DistinctNames>COLUMNS
§
body: InsertBodyVALUES or SELECT
§
returning: Option<Vec<ResultColumn>>RETURNING
Pragma(QualifiedName, Option<PragmaBody>)
PRAGMA: pragma name, body
Reindex
REINDEX
Fields
§
obj_name: Option<QualifiedName>collation or index or table name
Release(Name)
RELEASE: savepoint name
Rollback
ROLLBACK
Savepoint(Name)
SAVEPOINT: savepoint name
Select(Box<Select>)
SELECT
Update
UPDATE
Fields
§
or_conflict: Option<ResolveType>OR
§
tbl_name: QualifiedNametable name
§
from: Option<FromClause>FROM
§
returning: Option<Vec<ResultColumn>>RETURNING
§
order_by: Option<Vec<SortedColumn>>ORDER BY
Vacuum(Option<Name>, Option<Expr>)
VACUUM: database name, into expr
Implementations§
Source§impl Stmt
impl Stmt
Sourcepub fn create_index(
unique: bool,
if_not_exists: bool,
idx_name: QualifiedName,
tbl_name: Name,
columns: Vec<SortedColumn>,
where_clause: Option<Expr>,
) -> Result<Self, ParserError>
pub fn create_index( unique: bool, if_not_exists: bool, idx_name: QualifiedName, tbl_name: Name, columns: Vec<SortedColumn>, where_clause: Option<Expr>, ) -> Result<Self, ParserError>
CREATE INDEX constructor
Sourcepub fn update(
with: Option<With>,
or_conflict: Option<ResolveType>,
tbl_name: QualifiedName,
indexed: Option<Indexed>,
sets: Vec<Set>,
from: Option<FromClause>,
where_clause: Option<Expr>,
returning: Option<Vec<ResultColumn>>,
order_by: Option<Vec<SortedColumn>>,
limit: Option<Limit>,
) -> Result<Self, ParserError>
pub fn update( with: Option<With>, or_conflict: Option<ResolveType>, tbl_name: QualifiedName, indexed: Option<Indexed>, sets: Vec<Set>, from: Option<FromClause>, where_clause: Option<Expr>, returning: Option<Vec<ResultColumn>>, order_by: Option<Vec<SortedColumn>>, limit: Option<Limit>, ) -> Result<Self, ParserError>
UPDATE constructor
Trait Implementations§
impl Eq for Stmt
impl StructuralPartialEq for Stmt
Auto Trait Implementations§
impl Freeze for Stmt
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnwindSafe for Stmt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.