use surrealdb::{engine::local::{Db, |EngineNamePascal|}, Surreal}; use crate::error::Result; use crate::store::Store; #[derive(Debug)] pub struct |StoreNamePascal| { pub db: Surreal, } impl Store for |StoreNamePascal| { fn get_db(&self) -> &Surreal { &self.db } } impl |StoreNamePascal| { pub async fn new() -> Result { let db = Surreal::new::<|EngineNamePascal|>("path/to/|store_name_snake|").await?; db.use_ns("|store_name_snake|").use_db("|store_name_snake|").await?; Ok(|StoreNamePascal| { db }) } }