impl table name
@@ -137,7 +137,7 @@ pub trait CRUD {
async fn update_batch_by_id<T>(&self, ids: &[T]) -> Result<u64> where T: CRUDEnable;
- async fn fetch_by_wrapper<T>(&self, w: &Wrapper) -> Result<T> where T: CRUDEnable+DeserializeOwned;
+ async fn fetch_by_wrapper<T>(&self, w: &Wrapper) -> Result<T> where T: CRUDEnable;
async fn fetch_by_id<T>(&self, id: &T::IdType) -> Result<T> where T: CRUDEnable;
///fetch all record
@@ -272,7 +272,7 @@ impl CRUD for Rbatis<'_> {
Ok(updates)
}
- async fn fetch_by_wrapper<T>(&self, w: &Wrapper) -> Result<T> where T: CRUDEnable+DeserializeOwned {
+ async fn fetch_by_wrapper<T>(&self, w: &Wrapper) -> Result<T> where T: CRUDEnable {
let fields = T::table_fields();
println!("fields:{}", fields);
unimplemented!()
@@ -306,8 +306,6 @@ fn make_where_sql(arg: &str) -> String {
}
-
-
mod test {
use chrono::{DateTime, Utc};
use fast_log::log::RuntimeType;
@@ -315,11 +313,12 @@ mod test {
use serde::Deserialize;
use serde::Serialize;
+ use rbatis_core::Error;
+
use crate::crud::{CRUD, CRUDEnable};
use crate::plugin::logic_delete::RbatisLogicDeletePlugin;
use crate::rbatis::Rbatis;
use crate::wrapper::Wrapper;
- use rbatis_core::Error;
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct BizActivity {
@@ -508,6 +507,5 @@ mod test {
println!("{}", r.err().unwrap().to_string());
}
});
-
}
}
\ No newline at end of file
