metal-orm 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -4430,6 +4430,23 @@ interface PaginatedResult<T> {
4430
4430
  pageSize: number;
4431
4431
  }
4432
4432
 
4433
+ type CursorPageOptions = {
4434
+ first?: number;
4435
+ after?: string;
4436
+ last?: number;
4437
+ before?: string;
4438
+ };
4439
+ type CursorPageInfo = {
4440
+ hasNextPage: boolean;
4441
+ hasPreviousPage: boolean;
4442
+ startCursor: string | null;
4443
+ endCursor: string | null;
4444
+ };
4445
+ type CursorPageResult<T> = {
4446
+ items: T[];
4447
+ pageInfo: CursorPageInfo;
4448
+ };
4449
+
4433
4450
  /**
4434
4451
  * Facet para gerenciar estado de cache no SelectQueryBuilder
4435
4452
  * Segue o padrão de facets existente no projeto
@@ -4927,7 +4944,35 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4927
4944
  pageSize: number;
4928
4945
  }): Promise<PaginatedResult<T>>;
4929
4946
  /**
4930
- * Executes the query and returns an array of values for a single column.
4947
+ * Executes the query using cursor-based (keyset) pagination.
4948
+ * Requires a stable ORDER BY on selected, non-null columns.
4949
+ * Cursor pagination currently supports simple column references only and
4950
+ * the cursor token is opaque: it must be reused with the same ORDER BY signature.
4951
+ *
4952
+ * @param session - ORM session context
4953
+ * @param options - Cursor pagination options (`first`/`after` or `last`/`before`)
4954
+ * @returns Promise of cursor-paginated result with items and pageInfo
4955
+ * @example
4956
+ * const page1 = await selectFrom(users)
4957
+ * .orderBy(users.columns.createdAt, 'DESC')
4958
+ * .orderBy(users.columns.id, 'DESC')
4959
+ * .executeCursor(session, { first: 20 });
4960
+ *
4961
+ * // Next page
4962
+ * const page2 = await selectFrom(users)
4963
+ * .orderBy(users.columns.createdAt, 'DESC')
4964
+ * .orderBy(users.columns.id, 'DESC')
4965
+ * .executeCursor(session, { first: 20, after: page1.pageInfo.endCursor });
4966
+ *
4967
+ * // Previous page from a known cursor
4968
+ * const prevPage = await selectFrom(users)
4969
+ * .orderBy(users.columns.createdAt, 'DESC')
4970
+ * .orderBy(users.columns.id, 'DESC')
4971
+ * .executeCursor(session, { last: 20, before: page2.pageInfo.startCursor });
4972
+ */
4973
+ executeCursor(session: OrmSession, options: CursorPageOptions): Promise<CursorPageResult<T>>;
4974
+ /**
4975
+ * Executes the query and returns an array of values for a single column.
4931
4976
  * This is a convenience method to avoid manual `.map(r => r.column)`.
4932
4977
  *
4933
4978
  * @param column - The column name to extract
@@ -7655,6 +7700,10 @@ declare const entityRefs: <T extends readonly EntityConstructor<object>[]>(...ct
7655
7700
  /**
7656
7701
  * Bag for storing decorator metadata during the decoration phase.
7657
7702
  */
7703
+ interface DecoratorTreeMetadata {
7704
+ parentProperty?: string;
7705
+ childrenProperty?: string;
7706
+ }
7658
7707
  interface DecoratorMetadataBag {
7659
7708
  columns: Array<{
7660
7709
  propertyName: string;
@@ -7668,6 +7717,7 @@ interface DecoratorMetadataBag {
7668
7717
  propertyName: string;
7669
7718
  metadata: TransformerMetadata;
7670
7719
  }>;
7720
+ tree?: DecoratorTreeMetadata;
7671
7721
  }
7672
7722
  /**
7673
7723
  * Public helper to read decorator metadata from a class constructor.
@@ -9743,7 +9793,7 @@ interface TreeDecoratorOptions {
9743
9793
  * }
9744
9794
  * ```
9745
9795
  */
9746
- declare function Tree(options?: TreeDecoratorOptions): <T extends abstract new (...args: unknown[]) => object>(target: T) => T;
9796
+ declare function Tree(options?: TreeDecoratorOptions): <T extends abstract new (...args: unknown[]) => object>(target: T, context: ClassDecoratorContext<T>) => T;
9747
9797
  /**
9748
9798
  * Decorator to mark a property as the parent relation in a tree entity.
9749
9799
  *
@@ -9764,6 +9814,11 @@ declare function TreeParent(): <T, V>(_value: undefined, context: ClassFieldDeco
9764
9814
  * ```
9765
9815
  */
9766
9816
  declare function TreeChildren(): <T, V>(_value: undefined, context: ClassFieldDecoratorContext<T, V>) => void;
9817
+ /**
9818
+ * Synchronizes tree metadata + self-relations for entities using @Tree decorators.
9819
+ * Safe to call multiple times (idempotent).
9820
+ */
9821
+ declare function syncTreeEntityMetadata(ctor: EntityConstructor, treeMetadata?: DecoratorTreeMetadata): void;
9767
9822
  /**
9768
9823
  * Gets tree metadata from an entity class.
9769
9824
  */
@@ -9840,4 +9895,4 @@ declare function setTreeBounds(entity: object, config: TreeConfig, lft: number,
9840
9895
  */
9841
9896
  declare function setTreeParentId(entity: object, config: TreeConfig, parentId: unknown): void;
9842
9897
 
9843
- export { type AliasRefNode, Alphanumeric, type AnyDomainEvent, type ApiRouteDefinition, type ApplyFilterOptions, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, type AutoCorrectionResult, type AutoTransformResult, type AutoTransformableValidator, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, CEP, CNPJ, CPF, type CacheCapabilities, type CacheInvalidator, type CacheOptions, type CacheProvider, type CacheReader, type CacheState, type CacheStrategy, type CacheWriter, type CallProcedureOptions, Capitalize, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnToTs, type ColumnType, type ComponentOptions, type ComponentReference, type CompositeTransformer, ConflictBuilder, ConstructorMaterializationStrategy, type ValidationResult as CountryValidationResult, type CountryValidator, type CountryValidatorFactory, type CreateDto, type CreateTediousClientOptions, DEFAULT_TREE_CONFIG, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DatabaseView, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultCacheStrategy, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, type Duration, Email, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecuteFilteredPagedOptions, type ExecutionContext, type ExecutionPayload, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, type FieldFilter, type FilterOperator, type FilterValue, type FindChildrenOptions, type FindPathOptions, type ForeignKeyReference, type FunctionNode, type GroupConcatOptions, type HasDomainEvents, HasMany, type HasManyCollection, type HasManyOptions, type HasManyRelation, HasOne, type HasOneOptions, type HasOneReference, type HasOneReferenceApi, type HasOneRelation, type HydrationContext, type HydrationMetadata, type HydrationPivotPlan, type HydrationPlan, type HydrationRelationPlan, type InExpressionNode, type InExpressionRight, type IndexColumn, type IndexDef, type InferRow, type InitialHandlers, InsertQueryBuilder, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDialect, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiDocumentOptions, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterObject, type OpenApiResponseObject, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmCacheOptions, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureDirection, type ProcedureExecutionResult, type ProcedureOutOptions, type ProcedureParamNode, type ProcedureRefNode, type PropertySanitizer, type PropertyTransformer, type PropertyValidator, PrototypeMaterializationStrategy, QueryCacheManager, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type RecoverResult, RedisCacheAdapter, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, type RelationFilter, type RelationKey$1 as RelationKey, RelationKinds, type RelationMap, type RelationTargetTable, type RelationType, type RenderColumnOptions, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, TagIndex, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type ThreadedNode, Title, type ToJsonOptions, type TrackedEntity, type TransformContext, type TransformerConfig, type TransformerMetadata, Tree, TreeChildren, type TreeColumns, type TreeConfig, type TreeDecoratorOptions, type TreeInsertData, type TreeListEntry, type TreeListOptions, type TreeListSchemaOptions, TreeManager, type TreeManagerOptions, type TreeMetadata, type TreeMoveData, type TreeNode, type TreeNodeResult, type TreeNodeResultSchemaOptions, type TreeNodeSchemaOptions, TreeParent, type TreeQuery, type TreeScope, type TreeValidationResult, Trim, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, addEntityRelation, addRelation, age, aliasRef, and, applyFilter, applyNullability, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, buildScopeConditions, calculateRowDepths, calculateTotalPages, callProcedure, canonicalizeSchema, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToFilterSchema, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, createTreeManager, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeFilteredPaged, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeProcedureAst, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, extractScopeValues, firstValue, floor, formatDuration, formatTreeList, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, generateTreeComponents, getColumn, getColumnMap, getColumnType, getDateKind, getDecoratorMetadata, getDeterministicComponentName, getOpenApiVersionForDialect, getRegisteredValidators, getSchemaIntrospector, getTableDefFromEntity, getTreeBounds, getTreeColumns, getTreeConfig, getTreeMetadata, getTreeParentId, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hasTreeBehavior, hasValidator, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isNullableColumn, isOperandNode, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pagedResponseToOpenApiSchema, paginationParamsSchema, parameterToRef, parseDuration, payloadResultSets, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, registerValidator, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, resolveTreeConfig, resolveValidator, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, setTreeBounds, setTreeMetadata, setTreeParentId, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, threadResults, threadedNodeToOpenApiSchema, toColumnRef, toExecutionPayload, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, treeEntityRegistry, treeListEntryToOpenApiSchema, treeNodeResultToOpenApiSchema, treeNodeToOpenApiSchema, treeQuery, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, validateTreeTable, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
9898
+ export { type AliasRefNode, Alphanumeric, type AnyDomainEvent, type ApiRouteDefinition, type ApplyFilterOptions, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, type AutoCorrectionResult, type AutoTransformResult, type AutoTransformableValidator, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, CEP, CNPJ, CPF, type CacheCapabilities, type CacheInvalidator, type CacheOptions, type CacheProvider, type CacheReader, type CacheState, type CacheStrategy, type CacheWriter, type CallProcedureOptions, Capitalize, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnToTs, type ColumnType, type ComponentOptions, type ComponentReference, type CompositeTransformer, ConflictBuilder, ConstructorMaterializationStrategy, type ValidationResult as CountryValidationResult, type CountryValidator, type CountryValidatorFactory, type CreateDto, type CreateTediousClientOptions, type CursorPageInfo, type CursorPageOptions, type CursorPageResult, DEFAULT_TREE_CONFIG, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DatabaseView, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultCacheStrategy, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, type Duration, Email, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecuteFilteredPagedOptions, type ExecutionContext, type ExecutionPayload, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, type FieldFilter, type FilterOperator, type FilterValue, type FindChildrenOptions, type FindPathOptions, type ForeignKeyReference, type FunctionNode, type GroupConcatOptions, type HasDomainEvents, HasMany, type HasManyCollection, type HasManyOptions, type HasManyRelation, HasOne, type HasOneOptions, type HasOneReference, type HasOneReferenceApi, type HasOneRelation, type HydrationContext, type HydrationMetadata, type HydrationPivotPlan, type HydrationPlan, type HydrationRelationPlan, type InExpressionNode, type InExpressionRight, type IndexColumn, type IndexDef, type InferRow, type InitialHandlers, InsertQueryBuilder, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDialect, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiDocumentOptions, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterObject, type OpenApiResponseObject, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmCacheOptions, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureDirection, type ProcedureExecutionResult, type ProcedureOutOptions, type ProcedureParamNode, type ProcedureRefNode, type PropertySanitizer, type PropertyTransformer, type PropertyValidator, PrototypeMaterializationStrategy, QueryCacheManager, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type RecoverResult, RedisCacheAdapter, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, type RelationFilter, type RelationKey$1 as RelationKey, RelationKinds, type RelationMap, type RelationTargetTable, type RelationType, type RenderColumnOptions, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, TagIndex, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type ThreadedNode, Title, type ToJsonOptions, type TrackedEntity, type TransformContext, type TransformerConfig, type TransformerMetadata, Tree, TreeChildren, type TreeColumns, type TreeConfig, type TreeDecoratorOptions, type TreeInsertData, type TreeListEntry, type TreeListOptions, type TreeListSchemaOptions, TreeManager, type TreeManagerOptions, type TreeMetadata, type TreeMoveData, type TreeNode, type TreeNodeResult, type TreeNodeResultSchemaOptions, type TreeNodeSchemaOptions, TreeParent, type TreeQuery, type TreeScope, type TreeValidationResult, Trim, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, addEntityRelation, addRelation, age, aliasRef, and, applyFilter, applyNullability, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, buildScopeConditions, calculateRowDepths, calculateTotalPages, callProcedure, canonicalizeSchema, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToFilterSchema, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, createTreeManager, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeFilteredPaged, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeProcedureAst, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, extractScopeValues, firstValue, floor, formatDuration, formatTreeList, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, generateTreeComponents, getColumn, getColumnMap, getColumnType, getDateKind, getDecoratorMetadata, getDeterministicComponentName, getOpenApiVersionForDialect, getRegisteredValidators, getSchemaIntrospector, getTableDefFromEntity, getTreeBounds, getTreeColumns, getTreeConfig, getTreeMetadata, getTreeParentId, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hasTreeBehavior, hasValidator, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isNullableColumn, isOperandNode, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pagedResponseToOpenApiSchema, paginationParamsSchema, parameterToRef, parseDuration, payloadResultSets, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, registerValidator, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, resolveTreeConfig, resolveValidator, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, setTreeBounds, setTreeMetadata, setTreeParentId, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, syncTreeEntityMetadata, synchronizeSchema, tableRef, tan, threadResults, threadedNodeToOpenApiSchema, toColumnRef, toExecutionPayload, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, treeEntityRegistry, treeListEntryToOpenApiSchema, treeNodeResultToOpenApiSchema, treeNodeToOpenApiSchema, treeQuery, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, validateTreeTable, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
package/dist/index.d.ts CHANGED
@@ -4430,6 +4430,23 @@ interface PaginatedResult<T> {
4430
4430
  pageSize: number;
4431
4431
  }
4432
4432
 
4433
+ type CursorPageOptions = {
4434
+ first?: number;
4435
+ after?: string;
4436
+ last?: number;
4437
+ before?: string;
4438
+ };
4439
+ type CursorPageInfo = {
4440
+ hasNextPage: boolean;
4441
+ hasPreviousPage: boolean;
4442
+ startCursor: string | null;
4443
+ endCursor: string | null;
4444
+ };
4445
+ type CursorPageResult<T> = {
4446
+ items: T[];
4447
+ pageInfo: CursorPageInfo;
4448
+ };
4449
+
4433
4450
  /**
4434
4451
  * Facet para gerenciar estado de cache no SelectQueryBuilder
4435
4452
  * Segue o padrão de facets existente no projeto
@@ -4927,7 +4944,35 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4927
4944
  pageSize: number;
4928
4945
  }): Promise<PaginatedResult<T>>;
4929
4946
  /**
4930
- * Executes the query and returns an array of values for a single column.
4947
+ * Executes the query using cursor-based (keyset) pagination.
4948
+ * Requires a stable ORDER BY on selected, non-null columns.
4949
+ * Cursor pagination currently supports simple column references only and
4950
+ * the cursor token is opaque: it must be reused with the same ORDER BY signature.
4951
+ *
4952
+ * @param session - ORM session context
4953
+ * @param options - Cursor pagination options (`first`/`after` or `last`/`before`)
4954
+ * @returns Promise of cursor-paginated result with items and pageInfo
4955
+ * @example
4956
+ * const page1 = await selectFrom(users)
4957
+ * .orderBy(users.columns.createdAt, 'DESC')
4958
+ * .orderBy(users.columns.id, 'DESC')
4959
+ * .executeCursor(session, { first: 20 });
4960
+ *
4961
+ * // Next page
4962
+ * const page2 = await selectFrom(users)
4963
+ * .orderBy(users.columns.createdAt, 'DESC')
4964
+ * .orderBy(users.columns.id, 'DESC')
4965
+ * .executeCursor(session, { first: 20, after: page1.pageInfo.endCursor });
4966
+ *
4967
+ * // Previous page from a known cursor
4968
+ * const prevPage = await selectFrom(users)
4969
+ * .orderBy(users.columns.createdAt, 'DESC')
4970
+ * .orderBy(users.columns.id, 'DESC')
4971
+ * .executeCursor(session, { last: 20, before: page2.pageInfo.startCursor });
4972
+ */
4973
+ executeCursor(session: OrmSession, options: CursorPageOptions): Promise<CursorPageResult<T>>;
4974
+ /**
4975
+ * Executes the query and returns an array of values for a single column.
4931
4976
  * This is a convenience method to avoid manual `.map(r => r.column)`.
4932
4977
  *
4933
4978
  * @param column - The column name to extract
@@ -7655,6 +7700,10 @@ declare const entityRefs: <T extends readonly EntityConstructor<object>[]>(...ct
7655
7700
  /**
7656
7701
  * Bag for storing decorator metadata during the decoration phase.
7657
7702
  */
7703
+ interface DecoratorTreeMetadata {
7704
+ parentProperty?: string;
7705
+ childrenProperty?: string;
7706
+ }
7658
7707
  interface DecoratorMetadataBag {
7659
7708
  columns: Array<{
7660
7709
  propertyName: string;
@@ -7668,6 +7717,7 @@ interface DecoratorMetadataBag {
7668
7717
  propertyName: string;
7669
7718
  metadata: TransformerMetadata;
7670
7719
  }>;
7720
+ tree?: DecoratorTreeMetadata;
7671
7721
  }
7672
7722
  /**
7673
7723
  * Public helper to read decorator metadata from a class constructor.
@@ -9743,7 +9793,7 @@ interface TreeDecoratorOptions {
9743
9793
  * }
9744
9794
  * ```
9745
9795
  */
9746
- declare function Tree(options?: TreeDecoratorOptions): <T extends abstract new (...args: unknown[]) => object>(target: T) => T;
9796
+ declare function Tree(options?: TreeDecoratorOptions): <T extends abstract new (...args: unknown[]) => object>(target: T, context: ClassDecoratorContext<T>) => T;
9747
9797
  /**
9748
9798
  * Decorator to mark a property as the parent relation in a tree entity.
9749
9799
  *
@@ -9764,6 +9814,11 @@ declare function TreeParent(): <T, V>(_value: undefined, context: ClassFieldDeco
9764
9814
  * ```
9765
9815
  */
9766
9816
  declare function TreeChildren(): <T, V>(_value: undefined, context: ClassFieldDecoratorContext<T, V>) => void;
9817
+ /**
9818
+ * Synchronizes tree metadata + self-relations for entities using @Tree decorators.
9819
+ * Safe to call multiple times (idempotent).
9820
+ */
9821
+ declare function syncTreeEntityMetadata(ctor: EntityConstructor, treeMetadata?: DecoratorTreeMetadata): void;
9767
9822
  /**
9768
9823
  * Gets tree metadata from an entity class.
9769
9824
  */
@@ -9840,4 +9895,4 @@ declare function setTreeBounds(entity: object, config: TreeConfig, lft: number,
9840
9895
  */
9841
9896
  declare function setTreeParentId(entity: object, config: TreeConfig, parentId: unknown): void;
9842
9897
 
9843
- export { type AliasRefNode, Alphanumeric, type AnyDomainEvent, type ApiRouteDefinition, type ApplyFilterOptions, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, type AutoCorrectionResult, type AutoTransformResult, type AutoTransformableValidator, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, CEP, CNPJ, CPF, type CacheCapabilities, type CacheInvalidator, type CacheOptions, type CacheProvider, type CacheReader, type CacheState, type CacheStrategy, type CacheWriter, type CallProcedureOptions, Capitalize, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnToTs, type ColumnType, type ComponentOptions, type ComponentReference, type CompositeTransformer, ConflictBuilder, ConstructorMaterializationStrategy, type ValidationResult as CountryValidationResult, type CountryValidator, type CountryValidatorFactory, type CreateDto, type CreateTediousClientOptions, DEFAULT_TREE_CONFIG, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DatabaseView, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultCacheStrategy, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, type Duration, Email, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecuteFilteredPagedOptions, type ExecutionContext, type ExecutionPayload, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, type FieldFilter, type FilterOperator, type FilterValue, type FindChildrenOptions, type FindPathOptions, type ForeignKeyReference, type FunctionNode, type GroupConcatOptions, type HasDomainEvents, HasMany, type HasManyCollection, type HasManyOptions, type HasManyRelation, HasOne, type HasOneOptions, type HasOneReference, type HasOneReferenceApi, type HasOneRelation, type HydrationContext, type HydrationMetadata, type HydrationPivotPlan, type HydrationPlan, type HydrationRelationPlan, type InExpressionNode, type InExpressionRight, type IndexColumn, type IndexDef, type InferRow, type InitialHandlers, InsertQueryBuilder, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDialect, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiDocumentOptions, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterObject, type OpenApiResponseObject, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmCacheOptions, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureDirection, type ProcedureExecutionResult, type ProcedureOutOptions, type ProcedureParamNode, type ProcedureRefNode, type PropertySanitizer, type PropertyTransformer, type PropertyValidator, PrototypeMaterializationStrategy, QueryCacheManager, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type RecoverResult, RedisCacheAdapter, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, type RelationFilter, type RelationKey$1 as RelationKey, RelationKinds, type RelationMap, type RelationTargetTable, type RelationType, type RenderColumnOptions, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, TagIndex, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type ThreadedNode, Title, type ToJsonOptions, type TrackedEntity, type TransformContext, type TransformerConfig, type TransformerMetadata, Tree, TreeChildren, type TreeColumns, type TreeConfig, type TreeDecoratorOptions, type TreeInsertData, type TreeListEntry, type TreeListOptions, type TreeListSchemaOptions, TreeManager, type TreeManagerOptions, type TreeMetadata, type TreeMoveData, type TreeNode, type TreeNodeResult, type TreeNodeResultSchemaOptions, type TreeNodeSchemaOptions, TreeParent, type TreeQuery, type TreeScope, type TreeValidationResult, Trim, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, addEntityRelation, addRelation, age, aliasRef, and, applyFilter, applyNullability, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, buildScopeConditions, calculateRowDepths, calculateTotalPages, callProcedure, canonicalizeSchema, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToFilterSchema, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, createTreeManager, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeFilteredPaged, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeProcedureAst, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, extractScopeValues, firstValue, floor, formatDuration, formatTreeList, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, generateTreeComponents, getColumn, getColumnMap, getColumnType, getDateKind, getDecoratorMetadata, getDeterministicComponentName, getOpenApiVersionForDialect, getRegisteredValidators, getSchemaIntrospector, getTableDefFromEntity, getTreeBounds, getTreeColumns, getTreeConfig, getTreeMetadata, getTreeParentId, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hasTreeBehavior, hasValidator, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isNullableColumn, isOperandNode, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pagedResponseToOpenApiSchema, paginationParamsSchema, parameterToRef, parseDuration, payloadResultSets, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, registerValidator, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, resolveTreeConfig, resolveValidator, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, setTreeBounds, setTreeMetadata, setTreeParentId, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, threadResults, threadedNodeToOpenApiSchema, toColumnRef, toExecutionPayload, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, treeEntityRegistry, treeListEntryToOpenApiSchema, treeNodeResultToOpenApiSchema, treeNodeToOpenApiSchema, treeQuery, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, validateTreeTable, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
9898
+ export { type AliasRefNode, Alphanumeric, type AnyDomainEvent, type ApiRouteDefinition, type ApplyFilterOptions, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, type AutoCorrectionResult, type AutoTransformResult, type AutoTransformableValidator, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, CEP, CNPJ, CPF, type CacheCapabilities, type CacheInvalidator, type CacheOptions, type CacheProvider, type CacheReader, type CacheState, type CacheStrategy, type CacheWriter, type CallProcedureOptions, Capitalize, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnToTs, type ColumnType, type ComponentOptions, type ComponentReference, type CompositeTransformer, ConflictBuilder, ConstructorMaterializationStrategy, type ValidationResult as CountryValidationResult, type CountryValidator, type CountryValidatorFactory, type CreateDto, type CreateTediousClientOptions, type CursorPageInfo, type CursorPageOptions, type CursorPageResult, DEFAULT_TREE_CONFIG, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DatabaseView, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultCacheStrategy, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, type Duration, Email, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecuteFilteredPagedOptions, type ExecutionContext, type ExecutionPayload, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, type FieldFilter, type FilterOperator, type FilterValue, type FindChildrenOptions, type FindPathOptions, type ForeignKeyReference, type FunctionNode, type GroupConcatOptions, type HasDomainEvents, HasMany, type HasManyCollection, type HasManyOptions, type HasManyRelation, HasOne, type HasOneOptions, type HasOneReference, type HasOneReferenceApi, type HasOneRelation, type HydrationContext, type HydrationMetadata, type HydrationPivotPlan, type HydrationPlan, type HydrationRelationPlan, type InExpressionNode, type InExpressionRight, type IndexColumn, type IndexDef, type InferRow, type InitialHandlers, InsertQueryBuilder, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDialect, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiDocumentOptions, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterObject, type OpenApiResponseObject, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmCacheOptions, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureDirection, type ProcedureExecutionResult, type ProcedureOutOptions, type ProcedureParamNode, type ProcedureRefNode, type PropertySanitizer, type PropertyTransformer, type PropertyValidator, PrototypeMaterializationStrategy, QueryCacheManager, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type RecoverResult, RedisCacheAdapter, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, type RelationFilter, type RelationKey$1 as RelationKey, RelationKinds, type RelationMap, type RelationTargetTable, type RelationType, type RenderColumnOptions, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, TagIndex, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type ThreadedNode, Title, type ToJsonOptions, type TrackedEntity, type TransformContext, type TransformerConfig, type TransformerMetadata, Tree, TreeChildren, type TreeColumns, type TreeConfig, type TreeDecoratorOptions, type TreeInsertData, type TreeListEntry, type TreeListOptions, type TreeListSchemaOptions, TreeManager, type TreeManagerOptions, type TreeMetadata, type TreeMoveData, type TreeNode, type TreeNodeResult, type TreeNodeResultSchemaOptions, type TreeNodeSchemaOptions, TreeParent, type TreeQuery, type TreeScope, type TreeValidationResult, Trim, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, addEntityRelation, addRelation, age, aliasRef, and, applyFilter, applyNullability, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, buildScopeConditions, calculateRowDepths, calculateTotalPages, callProcedure, canonicalizeSchema, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToFilterSchema, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, createTreeManager, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeFilteredPaged, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeProcedureAst, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, extractScopeValues, firstValue, floor, formatDuration, formatTreeList, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, generateTreeComponents, getColumn, getColumnMap, getColumnType, getDateKind, getDecoratorMetadata, getDeterministicComponentName, getOpenApiVersionForDialect, getRegisteredValidators, getSchemaIntrospector, getTableDefFromEntity, getTreeBounds, getTreeColumns, getTreeConfig, getTreeMetadata, getTreeParentId, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hasTreeBehavior, hasValidator, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isNullableColumn, isOperandNode, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pagedResponseToOpenApiSchema, paginationParamsSchema, parameterToRef, parseDuration, payloadResultSets, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, registerValidator, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, resolveTreeConfig, resolveValidator, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, setTreeBounds, setTreeMetadata, setTreeParentId, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, syncTreeEntityMetadata, synchronizeSchema, tableRef, tan, threadResults, threadedNodeToOpenApiSchema, toColumnRef, toExecutionPayload, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, treeEntityRegistry, treeListEntryToOpenApiSchema, treeNodeResultToOpenApiSchema, treeNodeToOpenApiSchema, treeQuery, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, validateTreeTable, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };