pub enum Statement {
Select {
table_name: String,
projections: Vec<String>,
where_clause: Option<WhereClause>,
},
Insert {
table_name: String,
item: HashMap<String, PartiqlValue>,
if_not_exists: bool,
},
#[non_exhaustive] Update {
table_name: String,
set_clauses: Vec<SetClause>,
remove_paths: Vec<String>,
where_clause: Option<WhereClause>,
returning: Option<ReturningVariant>,
},
#[non_exhaustive] Delete {
table_name: String,
where_clause: Option<WhereClause>,
returning: Option<ReturningVariant>,
},
}Expand description
A parsed PartiQL statement.
The Update and Delete variants are #[non_exhaustive]: they carry a
growing set of clauses (a RETURNING variant was added in 0.12.0), so
downstream code must match them with .. and cannot build them by struct
literal. This keeps later clause additions non-breaking, matching the
precedent set by DynoxideError.
Variants§
Select
Insert
#[non_exhaustive]Update
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
where_clause: Option<WhereClause>§
returning: Option<ReturningVariant>The RETURNING variant when the statement ends with a RETURNING
clause. All four variants are valid on UPDATE. None when absent.
#[non_exhaustive]Delete
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
where_clause: Option<WhereClause>§
returning: Option<ReturningVariant>The RETURNING variant when the statement ends with a RETURNING
clause. DynamoDB allows only ALL OLD * on DELETE; the executor
rejects the other variants. None when there is no clause.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnsafeUnpin 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