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