pub enum Payload {
Show 16 variants
ShowColumns(Vec<(String, DataType)>),
Create,
Insert(usize),
Select {
labels: Vec<String>,
rows: Vec<Vec<Value>>,
},
SelectMap(Vec<BTreeMap<String, Value>>),
Delete(usize),
Update(usize),
DropTable(usize),
DropFunction,
AlterTable,
CreateIndex,
DropIndex,
StartTransaction,
Commit,
Rollback,
ShowVariable(PayloadVariable),
}Variants§
ShowColumns(Vec<(String, DataType)>)
Create
Insert(usize)
Select
SelectMap(Vec<BTreeMap<String, Value>>)
Delete(usize)
Update(usize)
DropTable(usize)
DropFunction
AlterTable
CreateIndex
DropIndex
StartTransaction
Commit
Rollback
ShowVariable(PayloadVariable)
Implementations§
Source§impl Payload
impl Payload
Sourcepub fn select(&self) -> Option<impl Iterator<Item = HashMap<&str, &Value>>>
pub fn select(&self) -> Option<impl Iterator<Item = HashMap<&str, &Value>>>
Exports select payloads as an std::iter::Iterator.
The items of the Iterator are HashMap<Column, Value>, and they are borrowed by default.
If ownership is required, you need to acquire them directly.
- Some:
Payload::Select,Payload::SelectMap - None: otherwise
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Payload
impl<'de> Deserialize<'de> for Payload
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
Source§impl SelectExt for Payload
impl SelectExt for Payload
fn rows_as<T: FromGlueRow>(self) -> Result<Vec<T>, RowConversionError>
fn one_as<T: FromGlueRow>(self) -> Result<T, RowConversionError>
impl StructuralPartialEq for Payload
Auto Trait Implementations§
impl Freeze for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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§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