MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / set_drop_behavior

Method set_drop_behavior

sdk-rust/src/transaction.rs:203–205  ·  view source on GitHub ↗

Set the behavior when this transaction is dropped By default, transactions roll back when dropped. This can be changed to: - `DropBehavior::Commit` - Auto-commit on drop - `DropBehavior::Panic` - Panic if dropped without explicit commit/rollback - `DropBehavior::Ignore` - Do nothing (dangerous) # Examples ```no_run # use graphlite_sdk::{GraphLite, transaction::DropBehavior}; # let db = GraphLit

(&mut self, behavior: DropBehavior)

Source from the content-addressed store, hash-verified

201 /// # Ok::<(), graphlite_sdk::Error>(())
202 /// ```
203 pub fn set_drop_behavior(&mut self, behavior: DropBehavior) {
204 self.drop_behavior = behavior;
205 }
206
207 /// Internal commit implementation
208 fn commit_internal(&mut self) -> Result<()> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected