gluesql_memory_storage/
transaction.rs1use {
2 super::MemoryStorage,
3 async_trait::async_trait,
4 gluesql_core::{
5 error::{Error, Result},
6 store::Transaction,
7 },
8};
9
10#[async_trait]
11impl Transaction for MemoryStorage {
12 async fn begin(&mut self, autocommit: bool) -> Result<bool> {
13 if autocommit {
14 return Ok(false);
15 }
16
17 Err(Error::StorageMsg(
18 "[MemoryStorage] transaction is not supported".to_owned(),
19 ))
20 }
21
22 async fn rollback(&mut self) -> Result<()> {
23 Ok(())
24 }
25
26 async fn commit(&mut self) -> Result<()> {
27 Ok(())
28 }
29}