-
-
Notifications
You must be signed in to change notification settings - Fork 642
Open
Description
能不能把DatabaseTransaction和DatabaseConnection进行统一?这样对于下面的代码,
#[async_trait]
pub trait ILevelRepo: Send + Sync {
async fn find_by_id(&self, id: i64) -> crate::Result<Option>;
async fn create(&self, level: &Level) -> crate::Result<()>;
async fn save(&self, level: &Level, original: &Level) -> crate::Result<()>;
async fn find_levels(&self, query: LevelQuery) -> crate::Result<Vec>;
}
ILevelRepo就可以显示传入通用参数,而且ILevelRepo本身也可以使用Arc
cnwzhu
Metadata
Metadata
Assignees
Labels
No labels