pub struct DbSet<T: IEntityType> { /* private fields */ }Implementations§
Source§impl<T: IEntityType + IEntitySnapshot> DbSet<T>
impl<T: IEntityType + IEntitySnapshot> DbSet<T>
pub fn new(table_name: impl Into<String>) -> Self
pub fn with_provider( table_name: impl Into<String>, provider: Arc<dyn IDatabaseProvider>, ) -> Self
pub fn set_query_filter(&mut self, filter: BoolExpr)
Sourcepub fn set_filter_map(&mut self, map: Arc<HashMap<String, CompiledFilter>>)
pub fn set_filter_map(&mut self, map: Arc<HashMap<String, CompiledFilter>>)
Sets the global filter map (table_name → BoolExpr) used by NavigationLoader to scope secondary queries.
pub fn set_provider(&mut self, provider: Arc<dyn IDatabaseProvider>)
Sourcepub fn remove_all(&mut self)
pub fn remove_all(&mut self)
Convenience inherent method �?delegates to IDbSet::remove_all.
Sourcepub fn remove_at(&mut self, index: usize) -> EFResult<()>
pub fn remove_at(&mut self, index: usize) -> EFResult<()>
Convenience inherent method �?delegates to IDbSet::remove_at.
Sourcepub fn clear_entries(&mut self)
pub fn clear_entries(&mut self)
Convenience inherent method �?delegates to IDbSet::clear_entries.
Sourcepub fn query(&self) -> QueryBuilder<T>
pub fn query(&self) -> QueryBuilder<T>
Convenience inherent method — delegates to IQueryable::query.
Sourcepub fn query_ignore_filters(&self) -> QueryBuilder<T>
pub fn query_ignore_filters(&self) -> QueryBuilder<T>
Returns a query builder that bypasses the configured query filter. Use for administrative / cross-tenant queries.
pub fn attach(&mut self, entity: T)
pub fn tracked_entries(&self) -> impl Iterator<Item = &T>
pub fn tracked_entries_mut(&mut self) -> impl Iterator<Item = &mut T>
pub fn retain(&mut self, f: impl FnMut(&TrackedEntry<T>) -> bool)
Sourcepub fn remove_range(&mut self, entities: &[T])where
T: PartialEq,
pub fn remove_range(&mut self, entities: &[T])where
T: PartialEq,
Marks multiple entities as deleted.
Sourcepub async fn load_all(&mut self) -> EFResult<()>
pub async fn load_all(&mut self) -> EFResult<()>
Loads all rows from the database into the change tracker as Unchanged.
Sourcepub fn detect_changes(&mut self)where
T: IEntitySnapshot,
pub fn detect_changes(&mut self)where
T: IEntitySnapshot,
Compares attached entities against their original snapshots and marks changes.
pub async fn exists_by_id( &self, key_values: HashMap<String, DbValue>, ) -> EFResult<bool>
Sourcepub fn filter<F>(&self, apply: F) -> QueryBuilder<T>
pub fn filter<F>(&self, apply: F) -> QueryBuilder<T>
Starts a query filtered by a compile-time LINQ expression tree (linq!(�?).
Trait Implementations§
Source§impl<T: IEntityType + IEntitySnapshot> IDbSet<T> for DbSet<T>
impl<T: IEntityType + IEntitySnapshot> IDbSet<T> for DbSet<T>
Source§fn remove_all(&mut self)
fn remove_all(&mut self)
Marks all entities in the set as Deleted.
Source§fn remove_at(&mut self, index: usize) -> EFResult<()>
fn remove_at(&mut self, index: usize) -> EFResult<()>
Marks the entity at the given index as Deleted.
Source§fn added_entities(&self) -> Vec<&T>
fn added_entities(&self) -> Vec<&T>
Returns references to entities in Added state.
Source§fn modified_entities(&self) -> Vec<&T>
fn modified_entities(&self) -> Vec<&T>
Returns references to entities in Modified state.
Source§fn deleted_entities(&self) -> Vec<&T>
fn deleted_entities(&self) -> Vec<&T>
Returns references to entities in Deleted state.
Source§fn entries_with_state(&self) -> Vec<(&T, EntityState)>
fn entries_with_state(&self) -> Vec<(&T, EntityState)>
Returns an iterator over entity references and their states.
Source§fn clear_entries(&mut self)
fn clear_entries(&mut self)
Clears all tracked entries from the set.
Source§impl<T: IEntityType> IQueryable<T> for DbSet<T>
impl<T: IEntityType> IQueryable<T> for DbSet<T>
fn query(&self) -> QueryBuilder<T>
impl<T: IEntityType> LinqSource for DbSet<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for DbSet<T>
impl<T> !UnwindSafe for DbSet<T>
impl<T> Freeze for DbSet<T>
impl<T> Send for DbSet<T>
impl<T> Sync for DbSet<T>
impl<T> Unpin for DbSet<T>where
T: Unpin,
impl<T> UnsafeUnpin for DbSet<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more