Class ProLazyPropsLoader
Pro implementation of lazy Props loading with PVT materialization.
Database-agnostic: uses ISqlDialectPro for SQL queries.
public class ProLazyPropsLoader : ILazyPropsLoader
Inheritance
Implements
Properties
CacheDomain
The database (cache domain) this loader reads. A loader bound to one scope names its database: the reference
public string? CacheDomain { get; }
ScopeContext
The context (one scope, one connection) this loader is bound to. The stubs and list items it materializes keep
public IRedbContext? ScopeContext { get; }
Methods
FindStaleCachedGraphsAsync(IEnumerable<IRedbObject>, bool, CancellationToken)
The cached graphs among roots that may not be served: a loaded object inside one of them
public Task<HashSet<long>> FindStaleCachedGraphsAsync(IEnumerable<IRedbObject> roots, bool sync, CancellationToken cancellationToken = default)
LoadProps<TProps>(long, long)
Synchronous Props loading (for getter)
public TProps? LoadProps<TProps>(long objectId, long schemeId) where TProps : class, new()
LoadPropsAsync<TProps>(long, long, CancellationToken)
Async Props loading for single object via BULK mechanism
public Task<TProps?> LoadPropsAsync<TProps>(long objectId, long schemeId, CancellationToken cancellationToken = default) where TProps : class, new()
LoadPropsAsync<TProps>(long, long)
Async Props loading for single object via BULK mechanism
public Task<TProps> LoadPropsAsync<TProps>(long objectId, long schemeId) where TProps : class, new()
LoadPropsForMany<TProps>(List<RedbObject<TProps>>, int?)
Synchronous : the
public void LoadPropsForMany<TProps>(List<RedbObject<TProps>> objects, int? propsDepth) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, CancellationToken)
BULK Props loading for multiple objects with caching and parallelism.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, CancellationToken cancellationToken = default) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, HashSet<long>?, CancellationToken)
OPTIMIZED Props loading with structure_ids filter.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, HashSet<long>? projectedStructureIds, CancellationToken cancellationToken = default) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, HashSet<long>?, int?, CancellationToken)
OPTIMIZED Props loading with structure_ids filter and custom depth.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, HashSet<long>? projectedStructureIds, int? propsDepth, CancellationToken cancellationToken = default) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, HashSet<long>?, int?)
OPTIMIZED Props loading with structure_ids filter and custom depth.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, HashSet<long>? projectedStructureIds, int? propsDepth) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, HashSet<long>?)
OPTIMIZED Props loading with structure_ids filter.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, HashSet<long>? projectedStructureIds) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, int?, CancellationToken)
BULK Props loading with custom depth for nested RedbObject.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, int? propsDepth, CancellationToken cancellationToken = default) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, int?)
BULK Props loading with custom depth for nested RedbObject.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, int? propsDepth) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>)
BULK Props loading for multiple objects with caching and parallelism.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects) where TProps : class, new()