common/database/db_context.rs
1// Generated by Qleany v1.7.0 from db_context.tera
2
3use crate::database::hashmap_store::HashMapStore;
4use std::sync::Arc;
5
6#[derive(Clone, Debug)]
7pub struct DbContext {
8 store: Arc<HashMapStore>,
9}
10
11impl DbContext {
12 pub fn new() -> Result<Self, crate::error::RepositoryError> {
13 Ok(DbContext {
14 store: Arc::new(HashMapStore::default()),
15 })
16 }
17
18 pub fn get_store(&self) -> &Arc<HashMapStore> {
19 &self.store
20 }
21}