pub enum Statement {
Show 17 variants
ShowColumns {
table_name: String,
},
Query(Query),
Insert {
table_name: String,
columns: Vec<String>,
source: Query,
},
Update {
table_name: String,
assignments: Vec<Assignment>,
selection: Option<Expr>,
},
Delete {
table_name: String,
selection: Option<Expr>,
},
CreateTable {
if_not_exists: bool,
name: String,
columns: Option<Vec<ColumnDef>>,
source: Option<Box<Query>>,
engine: Option<String>,
},
CreateFunction {
or_replace: bool,
name: String,
args: Vec<OperateFunctionArg>,
return_: Expr,
},
AlterTable {
name: String,
operation: AlterTableOperation,
},
DropTable {
if_exists: bool,
names: Vec<String>,
},
DropFunction {
if_exists: bool,
names: Vec<String>,
},
CreateIndex {
name: String,
table_name: String,
column: OrderByExpr,
},
DropIndex {
name: String,
table_name: String,
},
StartTransaction,
Commit,
Rollback,
ShowVariable(Variable),
ShowIndexes(String),
}
Variants§
ShowColumns
Query(Query)
SELECT, VALUES
Insert
Fields
INSERT
Update
Fields
§
assignments: Vec<Assignment>
Column assignments
UPDATE
Delete
DELETE
CreateTable
Fields
CREATE TABLE
CreateFunction
CREATE FUNCTION
AlterTable
ALTER TABLE
DropTable
Fields
DROP TABLE
DropFunction
Fields
DROP FUNCTION
CreateIndex
CREATE INDEX
DropIndex
DROP INDEX
StartTransaction
START TRANSACTION, BEGIN
Commit
COMMIT
Rollback
ROLLBACK
ShowVariable(Variable)
SHOW VARIABLE
ShowIndexes(String)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Statement
impl<'de> Deserialize<'de> for Statement
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Statement, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Statement, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Statement
impl PartialEq for Statement
source§impl Serialize for Statement
impl Serialize for Statement
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Statement
impl StructuralEq for Statement
impl StructuralPartialEq for Statement
Auto Trait Implementations§
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.