Enum sql_type::StatementType
source · pub enum StatementType<'a> {
Select {
columns: Vec<SelectTypeColumn<'a>>,
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
},
Delete {
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
},
Insert {
yield_autoincrement: AutoIncrementId,
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
returning: Option<Vec<SelectTypeColumn<'a>>>,
},
Update {
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
},
Replace {
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>,
returning: Option<Vec<SelectTypeColumn<'a>>>,
},
Invalid,
}
Expand description
Type information of typed statement
Variants§
Select
Fields
§
columns: Vec<SelectTypeColumn<'a>>
The types and named of the columns return from the select
§
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>
The key and type of arguments to the query
The statement was a select statement
Delete
Fields
§
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>
The key and type of arguments to the query
The statement is a delete statement
Insert
Fields
§
yield_autoincrement: AutoIncrementId
The insert happend in a table with a auto increment id row
§
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>
The key and type of arguments to the query
§
returning: Option<Vec<SelectTypeColumn<'a>>>
If present, the types and names of the columns returned from the insert
The statement is an insert statement
Update
Fields
§
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>
The key and type of arguments to the query
The statement is a update statement
Replace
Fields
§
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>
The key and type of arguments to the query
§
returning: Option<Vec<SelectTypeColumn<'a>>>
If present, the types and names of the columns returned from the replace
The statement is a replace statement
Invalid
The query was not valid, errors are preset in issues
Trait Implementations§
source§impl<'a> Clone for StatementType<'a>
impl<'a> Clone for StatementType<'a>
source§fn clone(&self) -> StatementType<'a>
fn clone(&self) -> StatementType<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more