MCPcopy Create free account
hub / github.com/Migorithm/rustiful-backend / commit

Method commit

library/src/adapters/database.rs:67–76  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

65 }
66
67 pub async fn commit(&mut self) -> ApplicationResult<()> {
68 if self.transaction.is_none() {
69 panic!("Tranasction Has Not Begun!");
70 };
71
72 let trx = mem::take(&mut self.transaction).unwrap();
73 trx.commit()
74 .await
75 .map_err(|err| ApplicationError::DatabaseConnectionError(Box::new(err)))
76 }
77 pub async fn rollback(&mut self) -> ApplicationResult<()> {
78 if self.transaction.is_none() {
79 panic!("Tranasction Has Not Begun!");

Callers 9

test_add_boardFunction · 0.45
test_get_boardFunction · 0.45
test_delete_boardFunction · 0.45
test_update_boardFunction · 0.45
test_create_commentFunction · 0.45
test_edit_boardFunction · 0.45
test_add_commentFunction · 0.45
test_transaction_commitFunction · 0.45

Calls

no outgoing calls

Tested by 9

test_add_boardFunction · 0.36
test_get_boardFunction · 0.36
test_delete_boardFunction · 0.36
test_update_boardFunction · 0.36
test_create_commentFunction · 0.36
test_edit_boardFunction · 0.36
test_add_commentFunction · 0.36
test_transaction_commitFunction · 0.36