pub struct SqlMutation { /* private fields */ }Expand description
One autocommit mutation planned against an immutable basis.
Implementations§
Source§impl SqlMutation
impl SqlMutation
Sourcepub const fn kind(&self) -> MutationKind
pub const fn kind(&self) -> MutationKind
Mutation kind.
Sourcepub const fn expected_basis_t(&self) -> u64
pub const fn expected_basis_t(&self) -> u64
Basis this read/modify/write plan requires.
Sourcepub fn forms(&self) -> &[Edn]
pub fn forms(&self) -> &[Edn]
Transaction forms to submit through Corium’s normal authenticated and authorized transactor path.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether committing can be skipped because the statement produced no
changes. This is possible for an UPDATE or DELETE matching no rows.
Sourcepub async fn finish(
&self,
db_after: &Db,
tempids: &BTreeMap<String, EntityId>,
) -> Result<SqlMutationResult, SqlError>
pub async fn finish( &self, db_after: &Db, tempids: &BTreeMap<String, EntityId>, ) -> Result<SqlMutationResult, SqlError>
Produces RETURNING rows from the committed database value.
DELETE RETURNING is buffered from the pre-commit snapshot. Inserts
and updates are read from db_after, resolving generated entity ids
through tempids.
§Errors
Returns SqlError if a generated id is absent or a returning query
cannot be executed.
Auto Trait Implementations§
impl Freeze for SqlMutation
impl RefUnwindSafe for SqlMutation
impl Send for SqlMutation
impl Sync for SqlMutation
impl Unpin for SqlMutation
impl UnsafeUnpin for SqlMutation
impl UnwindSafe for SqlMutation
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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