Rename methods
This commit is contained in:
1 parent
b006ece0c1
commit
3ac7cd068b
3 files changed
+125
-86
No files matched your search
@@ -98,7 +98,7 @@ where
|
||||
rule: Box<dyn Fn(&T) -> bool + Send + Sync>,
|
||||
parallel: bool,
|
||||
_marker: PhantomData<(R, D)>,
|
||||
shift_stamp: u16
|
||||
shift_stamp: u16,
|
||||
}
|
||||
|
||||
impl<T: EntityData + Clone, R: Repository<T, D>, D: DbLayer<T>> Query<T, R, D> {
|
||||
@@ -177,8 +177,8 @@ pub trait BatchedDbLayer<T>
|
||||
where
|
||||
T: EntityData,
|
||||
{
|
||||
fn delete_many(&mut self, ids: &[Id], connection: &Connection) -> MaybeError;
|
||||
fn add_many_entity(&mut self, entity: &mut [T], connection: &Connection) -> MaybeError;
|
||||
fn delete_many_entities(&mut self, ids: &[Id], connection: &Connection) -> MaybeError;
|
||||
fn add_many_entities(&mut self, entity: &mut [T], connection: &Connection) -> MaybeError;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -405,7 +405,7 @@ impl<T: EntityData + Clone, D: BatchedDbLayer<T> + DbLayer<T>> BatchedRepository
|
||||
});
|
||||
|
||||
self.data_layer
|
||||
.add_many_entity(&mut temp_values, &self.connection.read())?;
|
||||
.add_many_entities(&mut temp_values, &self.connection.read())?;
|
||||
|
||||
let start = self.cache.len();
|
||||
|
||||
@@ -447,7 +447,7 @@ impl<T: EntityData + Clone, D: BatchedDbLayer<T> + DbLayer<T>> BatchedRepository
|
||||
!remove
|
||||
});
|
||||
self.data_layer
|
||||
.delete_many(cached.as_slice(), &self.connection.read())?;
|
||||
.delete_many_entities(cached.as_slice(), &self.connection.read())?;
|
||||
let len = cached.len();
|
||||
cell = 0;
|
||||
self.cache.retain(|x| {
|
||||
|
||||
Reference in new issue
Block a user