#[non_exhaustive]pub enum QueryType {
Unknown,
Select,
Insert,
Update,
Delete,
Merge,
}Expand description
Which statement a query renders.
Carried so the execution layer can decide whether to expect rows without parsing the SQL back.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
Not one of the four — a raw statement, a DDL statement, a bare expression.
Select
SELECT.
Insert
INSERT.
Update
UPDATE.
Delete
DELETE.
Merge
MERGE — PostgreSQL’s conditional insert/update/delete against a source.
A fifth statement kind rather than a flavour of the four: whether it
returns rows depends on its RETURNING clause, exactly as for the three
mutations, but it is none of them.
Trait Implementations§
impl Copy for QueryType
impl Eq for QueryType
impl StructuralPartialEq for QueryType
Auto Trait Implementations§
impl Freeze for QueryType
impl RefUnwindSafe for QueryType
impl Send for QueryType
impl Sync for QueryType
impl Unpin for QueryType
impl UnsafeUnpin for QueryType
impl UnwindSafe for QueryType
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