pub enum Stmt {
Show 25 variants
AlterTable(Box<(QualifiedName, AlterTableBody)>),
Analyze(Option<QualifiedName>),
Attach {
expr: Box<Expr>,
db_name: Box<Expr>,
key: Option<Box<Expr>>,
},
Begin(Option<TransactionType>, Option<Name>),
Commit(Option<Name>),
CreateIndex {
unique: bool,
if_not_exists: bool,
idx_name: Box<QualifiedName>,
tbl_name: Name,
columns: Vec<SortedColumn>,
where_clause: Option<Box<Expr>>,
},
CreateTable {
temporary: bool,
if_not_exists: bool,
tbl_name: QualifiedName,
body: Box<CreateTableBody>,
},
CreateTrigger(Box<CreateTrigger>),
CreateView {
temporary: bool,
if_not_exists: bool,
view_name: QualifiedName,
columns: Option<Vec<IndexedColumn>>,
select: Box<Select>,
},
CreateVirtualTable(Box<CreateVirtualTable>),
Delete(Box<Delete>),
Detach(Box<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(Box<Insert>),
Pragma(Box<QualifiedName>, Option<Box<PragmaBody>>),
Reindex {
obj_name: Option<QualifiedName>,
},
Release(Name),
Rollback {
tx_name: Option<Name>,
savepoint_name: Option<Name>,
},
Savepoint(Name),
Select(Box<Select>),
Update(Box<Update>),
Vacuum(Option<Name>, Option<Box<Expr>>),
}Expand description
SQL statement
Variants§
AlterTable(Box<(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
Fields
§
idx_name: Box<QualifiedName>index name
§
columns: Vec<SortedColumn>indexed columns or expressions
CreateTable
CREATE TABLE
CreateTrigger(Box<CreateTrigger>)
CREATE TRIGGER
CreateView
CREATE VIEW
CreateVirtualTable(Box<CreateVirtualTable>)
CREATE VIRTUAL TABLE
Delete(Box<Delete>)
DELETE
Detach(Box<Expr>)
DETACH DATABASE: db name
DropIndex
DROP INDEX
DropTable
DROP TABLE
DropTrigger
DROP TRIGGER
DropView
DROP VIEW
Insert(Box<Insert>)
INSERT
Pragma(Box<QualifiedName>, Option<Box<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(Box<Update>)
UPDATE
Vacuum(Option<Name>, Option<Box<Expr>>)
VACUUM: database name, into expr
Implementations§
Source§impl Stmt
impl Stmt
Sourcepub fn column_count(&self) -> ColumnCount
pub fn column_count(&self) -> ColumnCount
Like sqlite3_column_count but more limited
Sourcepub fn check(&self) -> Result<(), ParserError>
pub fn check(&self) -> Result<(), ParserError>
check for extra rules
Trait Implementations§
impl Eq for Stmt
impl StructuralPartialEq for Stmt
Source§impl ToSqlString for Stmt
impl ToSqlString for Stmt
Source§fn to_sql_string<C: ToSqlContext>(&self, context: &C) -> String
fn to_sql_string<C: ToSqlContext>(&self, context: &C) -> String
Convert the given value to String
Auto Trait Implementations§
impl Freeze for Stmt
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnsafeUnpin 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.