diff --git a/src/transaction.rs b/src/transaction.rs index 668dacfbf..e1f3198df 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -12,6 +12,10 @@ impl Transaction { Ok(QueryResult::default()) } + pub fn rollback(self) -> Result { + Ok(QueryResult::default()) + } + pub fn transaction(&self) -> Transaction { Transaction::default() } diff --git a/tests/transaction_test.rs b/tests/transaction_test.rs index 286668ea2..64ee0197d 100644 --- a/tests/transaction_test.rs +++ b/tests/transaction_test.rs @@ -32,3 +32,10 @@ fn transaction_commit() { let transaction = db.transaction(); let _result: Result = transaction.commit(); } + +#[test] +fn transaction_rollback() { + let db = agdb::Db::default(); + let transaction = db.transaction(); + let _result: Result = transaction.rollback(); +}