Skip to main content

common/database/
db_context.rs

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