Enum gluesql_core::ast::Statement
source · 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>,
foreign_keys: Vec<ForeignKey>,
comment: 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>,
cascade: bool,
},
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
INSERT
Fields
Update
UPDATE
Fields
§
assignments: Vec<Assignment>Column assignments
Delete
DELETE
CreateTable
CREATE TABLE
Fields
§
foreign_keys: Vec<ForeignKey>CreateFunction
CREATE FUNCTION
AlterTable
ALTER TABLE
DropTable
DROP TABLE
Fields
DropFunction
DROP FUNCTION
Fields
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Statement
impl StructuralPartialEq for Statement
Auto Trait Implementations§
impl Freeze for Statement
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more