gluesql-shared-memory-storage 0.20.0

GlueSQL - Open source SQL database engine fully written in Rust with pure functional execution layer, easily swappable storage and web assembly support!
Documentation
use {
    super::SharedMemoryStorage,
    gluesql_core::{
        error::{Error, Result},
        store::Transaction,
    },
};

impl Transaction for SharedMemoryStorage {
    fn begin(&mut self, autocommit: bool) -> Result<bool> {
        if autocommit {
            return Ok(false);
        }

        Err(Error::StorageMsg(
            "[Shared MemoryStorage] transaction is not supported".to_owned(),
        ))
    }

    fn rollback(&mut self) -> Result<()> {
        Err(Error::StorageMsg(
            "[Shared MemoryStorage] transaction is not supported".to_owned(),
        ))
    }

    fn commit(&mut self) -> Result<()> {
        Err(Error::StorageMsg(
            "[Shared MemoryStorage] transaction is not supported".to_owned(),
        ))
    }
}