Class LazyPropsLoader

Assembly: redb.Postgres.dll

OpenSource implementation of lazy Props loading for PostgreSQL.
Uses get_object_json SQL function for simple and efficient loading.
Pro version uses PropsMaterializer with PVT optimizations.

public class LazyPropsLoader : ILazyPropsLoader

Inheritance

Object→LazyPropsLoader

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

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 get_object_json.

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 get_object_json.

public Task<TProps> LoadPropsAsync<TProps>(long objectId, long schemeId) where TProps : class, new()

LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, CancellationToken)

BULK Props loading at the default batch depth; the depth form above is the core.

public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, CancellationToken cancellationToken = default) where TProps : class, new()

LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, HashSet<long>?, CancellationToken)

BULK Props loading with projection filter (for Select projections).

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)

BULK Props loading with projection 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?)

BULK Props loading with projection 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>?)

BULK Props loading with projection filter (for Select projections).

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 for multiple objects via get_object_json batch.

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 via get_object_json batch.

public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects) where TProps : class, new()

LoadPropsForManyPolymorphicAsync(List<IRedbObject>, CancellationToken)

BULK loading for polymorphic objects (different schemes).

public Task LoadPropsForManyPolymorphicAsync(List<IRedbObject> objects, CancellationToken cancellationToken = default)

LoadPropsForManyPolymorphicAsync(List<IRedbObject>)

BULK loading for polymorphic objects (different schemes).

public Task LoadPropsForManyPolymorphicAsync(List<IRedbObject> objects)

Constructors