pub enum Statement {
Show 30 variants Analyze(Analyze), Truncate(Truncate), Msck(Msck), Query(Box<Query>), Insert(Insert), Directory(Directory), Copy(Copy), Update(Update), Delete(Delete), CreateView(CreateView), CreateTable(Box<CreateTable>), CreateVirtualTable(CreateVirtualTable), CreateIndex(CreateIndex), AlterTable(AlterTable), Drop(Drop), SetVariable(SetVariable), ShowVariable(ShowVariable), ShowCreate(ShowCreate), ShowColumns(ShowColumns), StartTransaction(StartTransaction), SetTransaction(SetTransaction), Commit(Commit), Rollback(Rollback), CreateSchema(CreateSchema), CreateDatabase(CreateDatabase), Assert(Assert), Deallocate(Deallocate), Execute(Execute), Prepare(Prepare), Explain(Explain),
}
Expand description

A top-level statement (SELECT, INSERT, CREATE, etc.)

Variants§

§

Analyze(Analyze)

Analyze (Hive)

§

Truncate(Truncate)

Truncate (Hive)

§

Msck(Msck)

Msck (Hive)

§

Query(Box<Query>)

SELECT

§

Insert(Insert)

INSERT

§

Directory(Directory)

§

Copy(Copy)

§

Update(Update)

UPDATE

§

Delete(Delete)

DELETE

§

CreateView(CreateView)

CREATE VIEW

§

CreateTable(Box<CreateTable>)

CREATE TABLE

§

CreateVirtualTable(CreateVirtualTable)

SQLite’s CREATE VIRTUAL TABLE .. USING <module_name> (<module_args>)

§

CreateIndex(CreateIndex)

CREATE INDEX

§

AlterTable(AlterTable)

ALTER TABLE

§

Drop(Drop)

DROP

§

SetVariable(SetVariable)

SET

Note: this is not a standard SQL statement, but it is supported by at least MySQL and PostgreSQL. Not all MySQL-specific syntatic forms are supported yet.

§

ShowVariable(ShowVariable)

SHOW

Note: this is a PostgreSQL-specific statement.

§

ShowCreate(ShowCreate)

SHOW CREATE TABLE

Note: this is a MySQL-specific statement.

§

ShowColumns(ShowColumns)

SHOW COLUMNS

Note: this is a MySQL-specific statement.

§

StartTransaction(StartTransaction)

{ BEGIN [ TRANSACTION | WORK ] | START TRANSACTION } ...

§

SetTransaction(SetTransaction)

SET TRANSACTION ...

§

Commit(Commit)

COMMIT [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ]

§

Rollback(Rollback)

ROLLBACK [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ]

§

CreateSchema(CreateSchema)

CREATE SCHEMA

§

CreateDatabase(CreateDatabase)

CREATE DATABASE

§

Assert(Assert)

ASSERT <condition> [AS <message>]

§

Deallocate(Deallocate)

DEALLOCATE [ PREPARE ] { name | ALL }

Note: this is a PostgreSQL-specific statement.

§

Execute(Execute)

EXECUTE name [ ( parameter [, ...] ) ]

Note: this is a PostgreSQL-specific statement.

§

Prepare(Prepare)

PREPARE name [ ( data_type [, ...] ) ] AS statement

Note: this is a PostgreSQL-specific statement.

§

Explain(Explain)

EXPLAIN

Trait Implementations§

source§

impl Clone for Statement

source§

fn clone(&self) -> Statement

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Statement

source§

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

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

impl Display for Statement

source§

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

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

impl Hash for Statement

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Statement> for Statement

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Statement

source§

impl StructuralEq for Statement

source§

impl StructuralPartialEq for Statement

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.