Class EnsureSchemaOnFirstUseStructuredStore
IStructuredStore decorator that lazily calls the inner store's
EnsureSchemaAsync(StructuredTableSchema, CancellationToken) for a fixed StructuredTableSchema
exactly once before the first real operation, then forwards everything verbatim. Built for
embedded backends whose storage lives on the player's device (e.g. the SQLite leaderboard
backend): no administrator exists there to provision the schema manually, so the store must
create its own table on first use. Server backends keep their manual-provisioning contract
and are never wrapped.
Inheritance
EnsureSchemaOnFirstUseStructuredStore
Assembly: Serenity.StructuredPersistence.Decorators.dll
Syntax
public class EnsureSchemaOnFirstUseStructuredStore : IStructuredStore, IPositionalStructuredStore
Constructors
EnsureSchemaOnFirstUseStructuredStore(IStructuredStore, StructuredTableSchema)
Declaration
public EnsureSchemaOnFirstUseStructuredStore(IStructuredStore inner, StructuredTableSchema schema)
Parameters
Exceptions
Properties
Namespace
Declaration
public string Namespace { get; }
Property Value
Methods
CountAsync(StoreTable, IReadOnlyList<FieldFilter>, IReadOnlyList<string>, CancellationToken)
Declaration
public Task<long> CountAsync(StoreTable table, IReadOnlyList<FieldFilter> filters, IReadOnlyList<string> distinctBy, CancellationToken cancellationToken)
Parameters
Returns
DeleteByQueryAsync(StoreTable, IReadOnlyList<FieldFilter>, CancellationToken)
Declaration
public Task DeleteByQueryAsync(StoreTable table, IReadOnlyList<FieldFilter> filters, CancellationToken cancellationToken)
Parameters
Returns
EnsureSchemaAsync(StructuredTableSchema, CancellationToken)
Declaration
public Task EnsureSchemaAsync(StructuredTableSchema schema, CancellationToken cancellationToken)
Parameters
Returns
Remarks
HealthCheckAsync(CancellationToken)
Declaration
public Task<bool> HealthCheckAsync(CancellationToken cancellationToken)
Parameters
Returns
InsertAsync(StoreTable, StructuredRecord, StructuredTrim, CancellationToken)
Declaration
public Task InsertAsync(StoreTable table, StructuredRecord record, StructuredTrim trim, CancellationToken cancellationToken)
Parameters
Returns
QueryAsync(StoreTable, StructuredQuery, CancellationToken)
Declaration
public Task<IReadOnlyList<StructuredRecord>> QueryAsync(StoreTable table, StructuredQuery query, CancellationToken cancellationToken)
Parameters
Returns
QueryWindowAroundAsync(StoreTable, IReadOnlyList<FieldFilter>, IReadOnlyList<string>, IReadOnlyList<OrderField>, FieldFilter, int, CancellationToken)
Declaration
public Task<IReadOnlyList<StructuredRecord>> QueryWindowAroundAsync(StoreTable table, IReadOnlyList<FieldFilter> scope, IReadOnlyList<string> distinctBy, IReadOnlyList<OrderField> ordering, FieldFilter targetKey, int radius, CancellationToken cancellationToken)
Parameters
Returns
TrimBeyondAsync(StoreTable, IReadOnlyList<FieldFilter>, IReadOnlyList<OrderField>, int, CancellationToken)
Declaration
public Task TrimBeyondAsync(StoreTable table, IReadOnlyList<FieldFilter> scopeFilters, IReadOnlyList<OrderField> ordering, int keepCount, CancellationToken cancellationToken)
Parameters
Returns
UpsertIfBetterAsync(StoreTable, StructuredRecord, IReadOnlyList<string>, string, StructuredSortDirection, StructuredTrim, CancellationToken)
Declaration
public Task UpsertIfBetterAsync(StoreTable table, StructuredRecord record, IReadOnlyList<string> keyFields, string comparisonField, StructuredSortDirection betterDirection, StructuredTrim trim, CancellationToken cancellationToken)
Parameters
Returns
Implements