gluesql_shared_memory_storage/
transaction.rs

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