use anyhow::Result;
use async_trait::async_trait;
use crate::db::manager::DatabaseBackendTrait;
use crate::db::{MessageMapping, RoomMapping, UserMapping};
pub struct SqliteBackend {
}
impl SqliteBackend {
pub async fn new(_url: &str) -> Result<Self> {
Ok(Self {})
}
}
#[async_trait]
impl DatabaseBackendTrait for SqliteBackend {
async fn migrate(&self) -> Result<()> {
Ok(())
}
async fn get_room_mapping(&self, _channel_id: &str) -> Result<Option<RoomMapping>> {
Ok(None)
}
async fn create_room_mapping(&self, _mapping: &RoomMapping) -> Result<()> {
Ok(())
}
async fn get_user_mapping(&self, _teams_user_id: &str) -> Result<Option<UserMapping>> {
Ok(None)
}
async fn create_user_mapping(&self, _mapping: &UserMapping) -> Result<()> {
Ok(())
}
async fn get_message_mapping(&self, _teams_message_id: &str) -> Result<Option<MessageMapping>> {
Ok(None)
}
async fn create_message_mapping(&self, _mapping: &MessageMapping) -> Result<()> {
Ok(())
}
}