MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / rollback

Method rollback

src/sql-server-util/src/lib.rs:484–491  ·  view source on GitHub ↗

Rollback the [`Transaction`].

(mut self)

Source from the content-addressed store, hash-verified

482
483 /// Rollback the [`Transaction`].
484 pub async fn rollback(mut self) -> Result<(), SqlServerError> {
485 static ROLLBACK_QUERY: &str = "ROLLBACK TRANSACTION";
486 // N.B. Mark closed _before_ running the query. This prevents us from
487 // double closing the transaction if this query itself fails.
488 self.closed = true;
489 self.client.simple_query(ROLLBACK_QUERY).await?;
490 Ok(())
491 }
492
493 /// Commit the [`Transaction`].
494 pub async fn commit(mut self) -> Result<(), SqlServerError> {

Callers 1

snapshotMethod · 0.45

Calls 1

simple_queryMethod · 0.45

Tested by

no test coverage detected