Skip to main content

Stmt

Enum Stmt 

Source
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

Fields

§expr: Box<Expr>

filename

§db_name: Box<Expr>

schema name

§key: Option<Box<Expr>>

password

§

Begin(Option<TransactionType>, Option<Name>)

BEGIN: tx type, tx name

§

Commit(Option<Name>)

COMMIT/END: tx name

§

CreateIndex

CREATE INDEX

Fields

§unique: bool

UNIQUE

§if_not_exists: bool

IF NOT EXISTS

§idx_name: Box<QualifiedName>

index name

§tbl_name: Name

table name

§columns: Vec<SortedColumn>

indexed columns or expressions

§where_clause: Option<Box<Expr>>

partial index

§

CreateTable

CREATE TABLE

Fields

§temporary: bool

TEMPORARY

§if_not_exists: bool

IF NOT EXISTS

§tbl_name: QualifiedName

table name

§body: Box<CreateTableBody>

table body

§

CreateTrigger(Box<CreateTrigger>)

CREATE TRIGGER

§

CreateView

CREATE VIEW

Fields

§temporary: bool

TEMPORARY

§if_not_exists: bool

IF NOT EXISTS

§view_name: QualifiedName

view name

§columns: Option<Vec<IndexedColumn>>

columns

§select: Box<Select>

query

§

CreateVirtualTable(Box<CreateVirtualTable>)

CREATE VIRTUAL TABLE

§

Delete(Box<Delete>)

DELETE

§

Detach(Box<Expr>)

DETACH DATABASE: db name

§

DropIndex

DROP INDEX

Fields

§if_exists: bool

IF EXISTS

§idx_name: QualifiedName

index name

§

DropTable

DROP TABLE

Fields

§if_exists: bool

IF EXISTS

§tbl_name: QualifiedName

table name

§

DropTrigger

DROP TRIGGER

Fields

§if_exists: bool

IF EXISTS

§trigger_name: QualifiedName

trigger name

§

DropView

DROP VIEW

Fields

§if_exists: bool

IF EXISTS

§view_name: QualifiedName

view name

§

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

Fields

§tx_name: Option<Name>

transaction name

§savepoint_name: Option<Name>

savepoint name

§

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

Source

pub fn column_count(&self) -> ColumnCount

Like sqlite3_column_count but more limited

Source

pub fn readonly(&self) -> bool

Like sqlite3_stmt_readonly

Source

pub fn check(&self) -> Result<(), ParserError>

check for extra rules

Trait Implementations§

Source§

impl Clone for Stmt

Source§

fn clone(&self) -> Stmt

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Stmt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Stmt

Source§

impl PartialEq for Stmt

Source§

fn eq(&self, other: &Stmt) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Stmt

Source§

impl ToSqlString for Stmt

Source§

fn to_sql_string<C: ToSqlContext>(&self, context: &C) -> String

Convert the given value to String
Source§

impl ToTokens for Stmt

Source§

fn to_tokens<S: TokenStream>(&self, s: &mut S) -> Result<(), S::Error>

Send token(s) to the specified stream
Source§

fn to_fmt(&self, f: &mut Formatter<'_>) -> Result

Format AST node
Source§

fn format(&self) -> Result<String, Error>

Format AST node 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.