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>)>,
returning: Option<Vec<SelectTypeColumn<'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
The statement was a select statement
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
Delete
The statement is a delete statement
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 delete
Insert
The statement is an insert statement
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
Update
The statement is a update statement
Fields
arguments: Vec<(ArgumentKey<'a>, FullType<'a>)>
The key and type of arguments to the query
Replace
The statement is a replace statement
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
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>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for StatementType<'a>
impl<'a> RefUnwindSafe for StatementType<'a>
impl<'a> Send for StatementType<'a>
impl<'a> Sync for StatementType<'a>
impl<'a> Unpin for StatementType<'a>
impl<'a> UnwindSafe for StatementType<'a>
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
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)
clone_to_uninit
)