Документация RedBase

Добро пожаловать в документацию RedBase. Обзор API, примеры кода и руководства по работе с REDB.

API Reference

Обзор документации REDB API. Выберите пространство имён или тип в дереве слева, или кликните по элементам ниже.

Результаты поиска: Key Очистить
C Agg redb.Core.Query.Aggregation
C BaseFilterExpressionParser redb.Core.Query.Parsing
M VisitDictionaryContainsKey(MethodCallExpression) Dictionary.ContainsKey visitor.
C CreateUserRequest redb.Core.Models.Users
P Key Additional user key (optional)
C E003_UniqueKeys redb.Examples.Examples
C E003_UniqueKeys_ef redb.Examples.ExamplesEf
C E004_SubtreeAndElementKeys redb.Examples.Examples
C E004_SubtreeAndElementKeys_ef redb.Examples.ExamplesEf
C E060_DictContainsKey redb.Examples.Examples
C E060_DictContainsKey_ef redb.Examples.ExamplesEf
C E063_DictTupleKey redb.Examples.Examples
C E063_DictTupleKey_ef redb.Examples.ExamplesEf
C E130_GroupByMultiKey redb.Examples.Examples
C E130_GroupByMultiKey_ef redb.Examples.ExamplesEf
C EmployeeProps_BonusByYear redb.Examples.Ef.Entities
P _key
C EmployeeProps_DepartmentHistory redb.Examples.Ef.Entities
P _key
C EmployeeProps_OfficeLocations redb.Examples.Ef.Entities
P _key
C EmployeeProps_PhoneDirectory redb.Examples.Ef.Entities
P _key
C EmployeeProps_ProjectMetrics redb.Examples.Ef.Entities
P _key
C ExampleResultProps_Results redb.Examples.Ef.Entities
P _key
C ExpressionSqlCache redb.Core.Query.Caching
M BuildCacheKey<TProps>(Expression<Func<TProps, bool>>, long) Generates stable cache key from Expression (without constant values).
C FieldInfo redb.Core.Query.Models
P DictKey For Dictionary fields: the key (e.g., "home" for PhoneBook["home"])
C FieldPathInfo redb.Core.Query.Projection
P DictKey Dictionary key (for AddressBook["home"])
C FlatColumn redb.Export.Flat.Model
P KeyComponent For one component of a tuple key: the field of the tuple (Item1, Item2, ...), as stored in the key J...
E FlatColumnRole redb.Export.Flat.Model
T DictionaryKey Dictionary key or one component of it, read from _array_index.
T PrimaryKey Primary key: the object id in a scheme table, the _values._id of the row elsewhere.
C FlatDdlGenerator redb.Export.Flat
M AddForeignKeys(FlatTable) The statements that add the foreign keys of table. Empty for a provider
C FlatForeignKey redb.Export.Flat.Model
E FlatKeyKind redb.Export.Flat.Model
C FlatNaming redb.Export.Flat
T KeyColumn Dictionary key; the prefix of the per-component columns of a tuple key.
E FlatStorageType redb.Export.Flat
T KeyText Text that takes part in a unique constraint (a dictionary key).
C FlatTable redb.Export.Flat.Model
P ForeignKeys Foreign keys. They are meant to be created after every table exists: a reference may point to a tabl...
P KeyKind How the key is laid out, for a dictionary table.
P KeyType CLR type of the key, for a dictionary table.
P PrimaryKey Name of the primary key column.
P PrimaryKeyName Name of the primary key constraint.
C GroupedWindowSpec<TKey, TProps> redb.Core.Query.Grouping
M PartitionBy<TField>(Expression<Func<TKey, TField>>) Partition window by group key field (for ranking within partitions).
I IGroupedWindowSpec<TKey, TProps> redb.Core.Query.Grouping
M PartitionBy<TField>(Expression<Func<TKey, TField>>) Partition window by group key field (for ranking within partitions).
I IKeyGenerator redb.Core.Data
E IndexCriticality redb.Core.Providers
T ForeignKey Serves a foreign key.
T PrimaryKey Backs a primary key.
C IndexStatistics redb.Core.Providers
P BacksForeignKey The index serves a foreign key, so dropping it turns key checks into scans.
P IsPrimaryKey The index backs a primary key.
M ThenBy<TKey>(Expression<Func<TProps, TKey>>) Additional ascending sort by Props field.
M ThenByDescending<TKey>(Expression<Func<TProps, TKey>>) Additional descending sort by Props field.
M ThenByDescendingRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Additional descending sort by IRedbObject base fields.
M ThenByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Additional ascending sort by IRedbObject base fields.
I IOrderingExpressionParser redb.Core.Query.QueryExpressions
I IRedbContext redb.Core.Data
P Keys Key generator with caching.
I IRedbGroupedQueryable<TKey, TProps> redb.Core.Query.Grouping
M Having(Expression<Func<IRedbGrouping<TKey, TProps>, bool>>) Filter groups by a predicate over aggregates (SQL HAVING).
M SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>) Executes projection with aggregations for each group.
M ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>, CancellationToken) Returns SQL string that will be executed for this GroupBy query.
M ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>) Returns SQL string that will be executed for this GroupBy query.
M WithWindow(Action<IGroupedWindowSpec<TKey, TProps>>) Apply window functions to grouped results.
I IRedbGrouping<TKey, TProps> redb.Core.Query.Grouping
P Key Group key (value by which grouped).
I IRedbObject redb.Core.Models.Contracts
P Key Object key field
I IRedbOptionsBuilderInfrastructure redb.Core.Extensions
P LicenseKey License key for Pro features (JWT token).
M ThenBy<TKey>(Expression<Func<TResult, TKey>>) Adds a key to the ordering started by OrderBy or OrderByDescending.
M ThenByDescending<TKey>(Expression<Func<TResult, TKey>>) Adds a descending key to the ordering started by OrderBy or OrderByDescending.
I IRedbQueryable<TProps> redb.Core.Query
M DistinctBy<TKey>(Expression<Func<TProps, TKey>>) DISTINCT ON (field) - one object per unique Props field value.
M DistinctByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) DISTINCT ON (base_field) - one object per unique IRedbObject base field value.
M GroupBy<TKey>(Expression<Func<TProps, TKey>>) Group by field with subsequent aggregation.
M GroupByArray<TItem, TKey>(Expression<Func<TProps, IEnumerable<TItem>>>, Expression<Func<TItem, TKey>>) Group by the elements of an array. The array is a chain of fields (x => x.Items,
M GroupByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Group by IRedbObject base fields (id, scheme_id, parent_id, etc.).
M OrderBy<TKey>(Expression<Func<TProps, TKey>>) Sort ascending by Props field.
M OrderByDescendingRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort descending by IRedbObject base fields.
M OrderByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort ascending by IRedbObject base fields (id, name, date_create, etc.).
I IRedbStructure redb.Core.Models.Contracts
P KeyType Key type ID for Dictionary fields. NULL for non-dictionary fields
I IRedbUser redb.Core.Models.Contracts
P Key Additional user key (optional)
I ISqlDialect redb.Core.Query
M Structures_CreateRootKey() CREATE the unique key of root structures. No params.
M Structures_RootKeyExists() SELECT returning a row when the unique key of root structures exists. No params. null: the engine ne...
M Structures_UpdateKeyType() UPDATE structure key type. Params: $1=keyType, $2=structureId
I IWindowSpec<TProps> redb.Core.Query.Window
M OrderBy<TKey>(Expression<Func<TProps, TKey>>) Sort within window by Props field (ascending).
M OrderByDesc<TKey>(Expression<Func<TProps, TKey>>) Sort within window by Props field (descending).
M OrderByDescRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort within window by IRedbObject base field (descending).
M OrderByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort within window by IRedbObject base field (ascending).
M PartitionByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Partition by IRedbObject base field (SchemeId, OwnerId, etc.).
C LicenseInfo redb.Core.Pro.Licensing
P KeyId RSA key identifier for key rotation (e.g., "app-2024-01")
C MsSqlDialect redb.MSSql.Sql
M Structures_CreateRootKey() CREATE the unique key of root structures. No params.
M Structures_RootKeyExists() SELECT returning a row when the unique key of root structures exists. No params. null: the engine ne...
M Structures_UpdateKeyType() UPDATE structure key type. Params: $1=keyType, $2=structureId
C NpgsqlKeyGenerator redb.Postgres.Data
M GenerateKeysAsync(int) Generate batch of keys from PostgreSQL sequence.
T NpgsqlKeyGenerator(NpgsqlDataSource) Create PostgreSQL key generator.
T NpgsqlKeyGenerator(string, string?) Create PostgreSQL key generator from connection string.
T NpgsqlKeyGenerator(string) Create PostgreSQL key generator from connection string.
M TryGenerateKeysInAmbientTransactionAsync(int) Inside a TransactionScope a refill on a connection of its own would be a second connection in the
C NpgsqlRedbContext redb.Postgres.Data
P Keys Key generator with caching.
C ObjectRecord redb.Export.Models
P Key Optional numeric key.
C objects redb.Examples.Ef.Entities
P _key
C ObjectStorageProviderBase redb.Core.Providers.Base
M ResolveObjectIdByUniqueKeyAsync(long, string?, CancellationToken) The single point where resolves "who owns this
C PostgreSqlDialect redb.Postgres.Sql
M Structures_CreateRootKey() CREATE the unique key of root structures. No params.
M Structures_RootKeyExists() SELECT returning a row when the unique key of root structures exists. No params. null: the engine ne...
M Structures_UpdateKeyType() UPDATE structure key type. Params: $1=keyType, $2=structureId
C ProSqlBuilder redb.MSSql.Pro.Query
M BuildGroupKeyColumn(GroupFieldRequest, IReadOnlyDictionary<string, FieldInfo>, string) The pivot column a GROUP BY key reads: the object's own column for a base key, the pivot
C ProSqlBuilder redb.Postgres.Pro.Query
M BuildGroupKeyColumn(GroupFieldRequest, IReadOnlyDictionary<string, FieldInfo>, string) The pivot column a GROUP BY key reads: the object's own column for a base key, the pivot
C RedbContextBase redb.Core.Data
P Keys Key generator.
C RedbGroupedQueryable<TKey, TProps> redb.Core.Query.Grouping
M Having(Expression<Func<IRedbGrouping<TKey, TProps>, bool>>) Filter groups by a predicate over aggregates (SQL HAVING).
M SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>) Executes projection with aggregations for each group.
M ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>, CancellationToken) Returns SQL string that will be executed for this GroupBy query.
M ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>) Returns SQL string that will be executed for this GroupBy query.
M WithWindow(Action<IGroupedWindowSpec<TKey, TProps>>) Apply window functions to grouped results: the window runs over the groups that pass Having.
C RedbKeyGeneratorBase redb.Core.Data
M GenerateKeysAsync(int) Generate batch of keys from database sequence.
M TryGenerateKeysInAmbientTransactionAsync(int) Provider hook for a refill that must not use a SEPARATE connection, bypassing the shared cache:
C RedbKeySerializer redb.Core.Utils
M CanBeKey(Type) Check if C# type is valid as Dictionary key
M Deserialize<TKey>(string) Deserialize _array_index text value to key
M GetKeyTypeId(Type) Get RedbTypeIds constant for key type
M IsComplexKey(Type) Check if key type is a complex type requiring JSON serialization
M Serialize<TKey>(TKey) Serialize key to _array_index text value
C RedbObject redb.Core.Models.Entities
P key
P Key Object key field
C RedbObjectRow redb.Core.Models.Entities
P Key External key for integration.
M ThenBy<TKey>(Expression<Func<TResult, TKey>>) Adds a key to the ordering started by OrderBy or OrderByDescending.
M ThenByDescending<TKey>(Expression<Func<TResult, TKey>>) Adds a descending key to the ordering started by OrderBy or OrderByDescending.
C RedbQueryable<TProps> redb.Core.Query
M DistinctBy<TKey>(Expression<Func<TProps, TKey>>) DISTINCT ON (field) - one object per unique Props field value.
M DistinctByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) DISTINCT ON (base_field) - one object per unique IRedbObject base field value.
M GroupBy<TKey>(Expression<Func<TProps, TKey>>) Grouping with aggregations.
M GroupByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Grouping by base IRedbObject fields (id, scheme_id, parent_id, etc.)
M OrderBy<TKey>(Expression<Func<TProps, TKey>>) Sort ascending by Props field.
M OrderByDescendingRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort descending by IRedbObject base fields.
M OrderByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort ascending by IRedbObject base fields (id, name, date_create, etc.).
M ThenBy<TKey>(Expression<Func<TProps, TKey>>) Additional ascending sort by Props field.
M ThenByDescending<TKey>(Expression<Func<TProps, TKey>>) Additional descending sort by Props field.
M ThenByDescendingRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Additional descending sort by IRedbObject base fields.
M ThenByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Additional ascending sort by IRedbObject base fields.
C RedbServiceBase redb.Core
M EnsureRootStructureKeyAsync() Builds the unique key of root structures when it is missing, removing empty duplicates first. Called...
M IsRootStructureKeyMissingAsync() Whether the engine needs the unique key of root structures () and the
C RedbStructure redb.Core.Models.Entities
P KeyType Key type ID for Dictionary fields. NULL for non-dictionary fields.
C RedbTypeMapping redb.Core.Utils
M CanBeKey(long) Check if type can be used as Dictionary key
C RedbUniqueKeyValueException redb.Core.Exceptions
T RedbUniqueKeyValueException(string) An object-level key (Э1, _objects._value_unique) that cannot be stored.
E RedbUniqueViolationKind redb.Core.Exceptions
T ObjectKey The object key: UIX__objects__scheme_unique over
C RedbUser redb.Core.Models.Entities
P Key Additional user key (optional).
C RootStructureKey redb.Core.Data
C SchemeMetadataCacheRow redb.Core.Pro.Models
C SqlKeyGenerator redb.MSSql.Data
M GenerateKeysAsync(int) Generate batch of keys from MSSQL sequence.
T SqlKeyGenerator(string, string?, Func<IRedbConnection?>?) Create MSSQL key generator from connection string.
T SqlKeyGenerator(string) Create MSSQL key generator from connection string.
M TryGenerateKeysInAmbientTransactionAsync(int) Inside a TransactionScope a refill on a connection of its own would be a second connection in the
C SqlRedbContext redb.MSSql.Data
P Keys Key generator with caching.
C StructureRecord redb.Export.Models
P KeyType Key type for dictionary-typed fields.
C TreeGroupedQueryable<TKey, TProps> redb.Core.Query.Grouping
M Having(Expression<Func<IRedbGrouping<TKey, TProps>, bool>>) Filter groups by a predicate over aggregates (SQL HAVING).
M SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>) Executes projection with aggregations for each group.
M ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>, CancellationToken) Returns SQL string that will be executed for this GroupBy query.
M ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>) Returns SQL string that will be executed for this GroupBy query.
M WithWindow(Action<IGroupedWindowSpec<TKey, TProps>>) Apply window functions to grouped results (tree-aware): the window runs over the groups that pass Ha...
M ThenBy<TKey>(Expression<Func<TResult, TKey>>) Adds a key to the ordering started by OrderBy or OrderByDescending.
M ThenByDescending<TKey>(Expression<Func<TResult, TKey>>) Adds a descending key to the ordering started by OrderBy or OrderByDescending.
C TreeQueryableBase<TProps> redb.Core.Query.Base
M DistinctBy<TKey>(Expression<Func<TProps, TKey>>) DISTINCT ON (field) - one object per unique Props field value.
M DistinctByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) DISTINCT ON (base_field) - one object per unique IRedbObject base field value.
M GroupBy<TKey>(Expression<Func<TProps, TKey>>) Override GroupBy to respect tree context (rootObjectId, maxDepth, ParentIds).
M GroupByArray<TItem, TKey>(Expression<Func<TProps, IEnumerable<TItem>>>, Expression<Func<TItem, TKey>>) Override GroupByArray to respect tree context: only the elements of the objects of the subtree are g...
M GroupByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Override GroupByRedb to respect tree context.
M OrderBy<TKey>(Expression<Func<TProps, TKey>>) FIX ISSUE #4: Override OrderBy to preserve Tree context
M OrderByDescending<TKey>(Expression<Func<TProps, TKey>>) FIX ISSUE #4: Override OrderByDescending for Tree context
M OrderByDescendingRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort descending by IRedbObject base fields.
M OrderByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort ascending by IRedbObject base fields (id, name, date_create, etc.).
M ThenBy<TKey>(Expression<Func<TProps, TKey>>) FIX ISSUE #4: Override ThenBy for Tree context
M ThenByDescending<TKey>(Expression<Func<TProps, TKey>>) FIX ISSUE #4: Override ThenByDescending for Tree context
M ThenByDescendingRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Additional descending sort by IRedbObject base fields.
M ThenByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Additional ascending sort by IRedbObject base fields.
C TrustedIssuers redb.Core.Pro.Licensing
M GetPublicKey(string, string) Gets the public key for a specific issuer and key ID.
C UniqueDuplicateGroup redb.Core.Models
P Key The colliding key.
C UniqueKeyEncoder redb.Core.Utils
C UpdateUserRequest redb.Core.Models.Users
P Key New additional key (if null - not changed)
C UserRecord redb.Export.Models
P Key Optional numeric key.
C UserSearchCriteria redb.Core.Models.Users
P KeyValue Filter by user key (exact match)
E UserSortField redb.Core.Models.Users
T Key
C WindowSpec<TProps> redb.Core.Query.Window
M OrderBy<TKey>(Expression<Func<TProps, TKey>>) Sort within window by Props field (ascending).
M OrderByDesc<TKey>(Expression<Func<TProps, TKey>>) Sort within window by Props field (descending).
M OrderByDescRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort within window by IRedbObject base field (descending).
M OrderByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Sort within window by IRedbObject base field (ascending).
M PartitionByRedb<TKey>(Expression<Func<IRedbObject, TKey>>) Partition by IRedbObject base field (SchemeId, OwnerId, etc.).