metal-orm 1.1.22 → 1.1.23

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.ts CHANGED
@@ -1986,23 +1986,6 @@ interface HydrationMetadata {
1986
1986
  [key: string]: unknown;
1987
1987
  }
1988
1988
 
1989
- type ProcedureDirection = 'in' | 'out' | 'inout';
1990
- interface ProcedureRefNode {
1991
- name: string;
1992
- schema?: string;
1993
- }
1994
- interface ProcedureParamNode {
1995
- name: string;
1996
- direction: ProcedureDirection;
1997
- value?: OperandNode;
1998
- dbType?: string;
1999
- }
2000
- interface ProcedureCallNode {
2001
- type: 'ProcedureCall';
2002
- ref: ProcedureRefNode;
2003
- params: ProcedureParamNode[];
2004
- }
2005
-
2006
1989
  /**
2007
1990
  * Context provided to function renderers.
2008
1991
  */
@@ -2044,30 +2027,16 @@ interface TableFunctionStrategy {
2044
2027
  getRenderer(key: string): TableFunctionRenderer | undefined;
2045
2028
  }
2046
2029
 
2047
- /**
2048
- * Context for SQL compilation with parameter management
2049
- */
2030
+ /** Context for SQL compilation with parameter management. */
2050
2031
  interface CompilerContext {
2051
- /** Array of parameters */
2052
2032
  params: unknown[];
2053
- /** Function to add a parameter and get its placeholder */
2054
2033
  addParameter(value: unknown): string;
2055
2034
  }
2056
- /**
2057
- * Result of SQL compilation
2058
- */
2035
+ /** Result of SQL compilation. */
2059
2036
  interface CompiledQuery {
2060
- /** Generated SQL string */
2061
2037
  sql: string;
2062
- /** Parameters for the query */
2063
2038
  params: unknown[];
2064
2039
  }
2065
- interface CompiledProcedureCall extends CompiledQuery {
2066
- outParams: {
2067
- source: 'none' | 'firstResultSet' | 'lastResultSet';
2068
- names: string[];
2069
- };
2070
- }
2071
2040
  interface SelectCompiler {
2072
2041
  compileSelect(ast: SelectQueryNode): CompiledQuery;
2073
2042
  }
@@ -2081,143 +2050,85 @@ interface DeleteCompiler {
2081
2050
  compileDelete(ast: DeleteQueryNode): CompiledQuery;
2082
2051
  }
2083
2052
  /**
2084
- * Abstract base class for SQL dialect implementations
2053
+ * Public dialect contract consumed by builders and the ORM runtime.
2054
+ * Optional backend features such as stored procedures live in dedicated
2055
+ * capability interfaces; mutation-wide behavior shared by the runtime stays
2056
+ * in this small core contract.
2057
+ */
2058
+ interface Dialect extends SelectCompiler, InsertCompiler, UpdateCompiler, DeleteCompiler {
2059
+ quoteIdentifier(id: string): string;
2060
+ supportsDmlReturningClause(): boolean;
2061
+ }
2062
+ /**
2063
+ * Shared implementation infrastructure for SQL dialects.
2064
+ *
2065
+ * This is deliberately separate from the public Dialect contract: custom
2066
+ * dialects may extend this class, extend SqlDialectBase, or use composition.
2085
2067
  */
2086
- declare abstract class Dialect implements SelectCompiler, InsertCompiler, UpdateCompiler, DeleteCompiler {
2087
- /** Dialect identifier used for function rendering and formatting */
2068
+ declare abstract class DialectBase implements Dialect {
2088
2069
  protected abstract readonly dialect: DialectName$1;
2089
- /**
2090
- * Compiles a SELECT query AST to SQL
2091
- * @param ast - Query AST to compile
2092
- * @returns Compiled query with SQL and parameters
2093
- */
2070
+ private readonly expressionCompilerRegistry;
2071
+ private readonly selectAstNormalizer;
2072
+ protected readonly functionStrategy: FunctionStrategy;
2073
+ protected readonly tableFunctionStrategy: TableFunctionStrategy;
2074
+ protected constructor(functionStrategy?: FunctionStrategy, tableFunctionStrategy?: TableFunctionStrategy);
2094
2075
  compileSelect(ast: SelectQueryNode): CompiledQuery;
2095
2076
  compileInsert(ast: InsertQueryNode): CompiledQuery;
2096
2077
  compileUpdate(ast: UpdateQueryNode): CompiledQuery;
2097
2078
  compileDelete(ast: DeleteQueryNode): CompiledQuery;
2098
- abstract compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
2099
2079
  supportsDmlReturningClause(): boolean;
2100
- /**
2101
- * Compiles SELECT query AST to SQL (to be implemented by concrete dialects)
2102
- * @param ast - Query AST
2103
- * @param ctx - Compiler context
2104
- * @returns SQL string
2105
- */
2106
2080
  protected abstract compileSelectAst(ast: SelectQueryNode, ctx: CompilerContext): string;
2107
2081
  protected abstract compileInsertAst(ast: InsertQueryNode, ctx: CompilerContext): string;
2108
2082
  protected abstract compileUpdateAst(ast: UpdateQueryNode, ctx: CompilerContext): string;
2109
2083
  protected abstract compileDeleteAst(ast: DeleteQueryNode, ctx: CompilerContext): string;
2110
- /**
2111
- * Quotes an SQL identifier (to be implemented by concrete dialects)
2112
- * @param id - Identifier to quote
2113
- * @returns Quoted identifier
2114
- */
2115
2084
  abstract quoteIdentifier(id: string): string;
2116
- /**
2117
- * Compiles a WHERE clause
2118
- * @param where - WHERE expression
2119
- * @param ctx - Compiler context
2120
- * @returns SQL WHERE clause or empty string
2121
- */
2122
2085
  protected compileWhere(where: ExpressionNode | undefined, ctx: CompilerContext): string;
2123
2086
  protected compileReturning(returning: ColumnNode[] | undefined, _ctx: CompilerContext): string;
2124
- /**
2125
- * Generates subquery for EXISTS expressions
2126
- * Rule: Always forces SELECT 1, ignoring column list
2127
- * Maintains FROM, JOINs, WHERE, GROUP BY, ORDER BY, LIMIT/OFFSET
2128
- * Does not add ';' at the end
2129
- * @param ast - Query AST
2130
- * @param ctx - Compiler context
2131
- * @returns SQL for EXISTS subquery
2132
- */
2133
2087
  protected compileSelectForExists(ast: SelectQueryNode, ctx: CompilerContext): string;
2134
- /**
2135
- * Creates a new compiler context
2136
- * @returns Compiler context with parameter management
2137
- */
2138
2088
  protected createCompilerContext(): CompilerContext;
2139
- /**
2140
- * Formats a parameter placeholder
2141
- * @param index - Parameter index
2142
- * @returns Formatted placeholder string
2143
- */
2144
2089
  protected formatPlaceholder(_index: number): string;
2145
- /**
2146
- * Whether the current dialect supports a given set operation.
2147
- * Override in concrete dialects to restrict support.
2148
- */
2149
2090
  protected supportsSetOperation(_kind: SetOperationKind): boolean;
2150
- /**
2151
- * Validates set-operation semantics:
2152
- * - Ensures the dialect supports requested operators.
2153
- * - Enforces that only the outermost compound query may have ORDER/LIMIT/OFFSET.
2154
- * @param ast - Query to validate
2155
- * @param isOutermost - Whether this node is the outermost compound query
2156
- */
2157
- protected validateSetOperations(ast: SelectQueryNode, isOutermost?: boolean): void;
2158
- /**
2159
- * Hoists CTEs from set-operation operands to the outermost query so WITH appears once.
2160
- * @param ast - Query AST
2161
- * @returns Normalized AST without inner CTEs and a list of hoisted CTEs
2162
- */
2163
- private hoistCtes;
2164
- /**
2165
- * Normalizes a SELECT AST before compilation (validation + CTE hoisting).
2166
- * @param ast - Query AST
2167
- * @returns Normalized query AST
2168
- */
2169
2091
  protected normalizeSelectAst(ast: SelectQueryNode): SelectQueryNode;
2170
- private readonly expressionCompilers;
2171
- private readonly operandCompilers;
2172
- protected readonly functionStrategy: FunctionStrategy;
2173
- protected readonly tableFunctionStrategy: TableFunctionStrategy;
2174
- protected constructor(functionStrategy?: FunctionStrategy, tableFunctionStrategy?: TableFunctionStrategy);
2175
- /**
2176
- * Creates a new Dialect instance (for testing purposes)
2177
- * @param functionStrategy - Optional function strategy
2178
- * @returns New Dialect instance
2179
- */
2180
- static create(functionStrategy?: FunctionStrategy, tableFunctionStrategy?: TableFunctionStrategy): Dialect;
2181
- /**
2182
- * Registers an expression compiler for a specific node type
2183
- * @param type - Expression node type
2184
- * @param compiler - Compiler function
2185
- */
2186
2092
  protected registerExpressionCompiler<T extends ExpressionNode>(type: T['type'], compiler: (node: T, ctx: CompilerContext) => string): void;
2187
- /**
2188
- * Registers an operand compiler for a specific node type
2189
- * @param type - Operand node type
2190
- * @param compiler - Compiler function
2191
- */
2192
2093
  protected registerOperandCompiler<T extends OperandNode>(type: T['type'], compiler: (node: T, ctx: CompilerContext) => string): void;
2193
- /**
2194
- * Compiles an expression node
2195
- * @param node - Expression node to compile
2196
- * @param ctx - Compiler context
2197
- * @returns Compiled SQL expression
2198
- */
2199
2094
  protected compileExpression(node: ExpressionNode, ctx: CompilerContext): string;
2200
- /**
2201
- * Compiles an operand node
2202
- * @param node - Operand node to compile
2203
- * @param ctx - Compiler context
2204
- * @returns Compiled SQL operand
2205
- */
2206
2095
  protected compileOperand(node: OperandNode, ctx: CompilerContext): string;
2207
- /**
2208
- * Compiles an ordering term (operand, expression, or alias reference).
2209
- */
2210
2096
  protected compileOrderingTerm(term: OrderingTerm, ctx: CompilerContext): string;
2211
- private registerDefaultExpressionCompilers;
2212
- private registerDefaultOperandCompilers;
2213
2097
  protected compileJsonPath(_node: JsonPathNode): string;
2214
- /**
2215
- * Compiles a function operand, using the dialect's function strategy.
2216
- */
2217
2098
  protected compileFunctionOperand(fnNode: FunctionNode, ctx: CompilerContext): string;
2099
+ /** Creates a minimal dialect implementation for isolated compiler tests. */
2100
+ static create(functionStrategy?: FunctionStrategy, tableFunctionStrategy?: TableFunctionStrategy): Dialect;
2218
2101
  }
2219
2102
 
2220
2103
  type DialectKey = 'postgres' | 'mysql' | 'sqlite' | 'mssql' | (string & {});
2104
+ type DialectFactoryFn = () => Dialect;
2105
+ declare class DialectFactory {
2106
+ private static registry;
2107
+ private static defaultsInitialized;
2108
+ private static ensureDefaults;
2109
+ /**
2110
+ * Register (or override) a dialect factory for a key.
2111
+ *
2112
+ * Implementations are structural: extending DialectBase/SqlDialectBase is
2113
+ * optional. A composed object satisfying Dialect is a valid registration.
2114
+ */
2115
+ static register(key: DialectKey, factory: DialectFactoryFn): void;
2116
+ /**
2117
+ * Resolve a key into a Dialect instance.
2118
+ * Throws if the key is not registered.
2119
+ */
2120
+ static create(key: DialectKey): Dialect;
2121
+ /**
2122
+ * Clear all registrations (mainly for tests).
2123
+ * Built-ins will be re-registered lazily on the next create().
2124
+ */
2125
+ static clear(): void;
2126
+ }
2127
+ /**
2128
+ * Helper to normalize either a Dialect instance OR a key into a Dialect instance.
2129
+ * This is what query builders will use.
2130
+ */
2131
+ declare const resolveDialectInput: (dialect: Dialect | DialectKey) => Dialect;
2221
2132
 
2222
2133
  /**
2223
2134
  * Node types that can be used in query projections
@@ -5904,6 +5815,42 @@ declare class DeleteQueryBuilder<T> {
5904
5815
  getAST(): DeleteQueryNode;
5905
5816
  }
5906
5817
 
5818
+ type ProcedureDirection = 'in' | 'out' | 'inout';
5819
+ interface ProcedureRefNode {
5820
+ name: string;
5821
+ schema?: string;
5822
+ }
5823
+ interface ProcedureParamNode {
5824
+ name: string;
5825
+ direction: ProcedureDirection;
5826
+ value?: OperandNode;
5827
+ dbType?: string;
5828
+ }
5829
+ interface ProcedureCallNode {
5830
+ type: 'ProcedureCall';
5831
+ ref: ProcedureRefNode;
5832
+ params: ProcedureParamNode[];
5833
+ }
5834
+
5835
+ interface CompiledProcedureCall extends CompiledQuery {
5836
+ outParams: {
5837
+ source: 'none' | 'firstResultSet' | 'lastResultSet';
5838
+ names: string[];
5839
+ };
5840
+ }
5841
+ /**
5842
+ * Optional dialect capability for stored-procedure compilation.
5843
+ *
5844
+ * Dialects that do not support procedures simply do not implement this
5845
+ * interface; unsupported behavior is resolved at the capability boundary
5846
+ * rather than through mandatory methods that only throw.
5847
+ */
5848
+ interface ProcedureCompiler {
5849
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
5850
+ }
5851
+ declare const isProcedureCompiler: (value: unknown) => value is ProcedureCompiler;
5852
+ declare const requireProcedureCompiler: (value: unknown) => ProcedureCompiler;
5853
+
5907
5854
  interface ProcedureExecutionResult {
5908
5855
  resultSets: QueryResult[];
5909
5856
  out: Record<string, unknown>;
@@ -5928,7 +5875,6 @@ declare class ProcedureCallBuilder {
5928
5875
  toSql(dialect: ProcedureDialectInput): string;
5929
5876
  getAST(): ProcedureCallNode;
5930
5877
  execute(session: OrmSession): Promise<ProcedureExecutionResult>;
5931
- private validateMssqlOutDbType;
5932
5878
  }
5933
5879
  declare const callProcedure: (name: string, options?: CallProcedureOptions) => ProcedureCallBuilder;
5934
5880
 
@@ -6031,11 +5977,10 @@ interface ReturningStrategy {
6031
5977
  }
6032
5978
 
6033
5979
  /**
6034
- * Base class for SQL dialects.
6035
- * Provides a common framework for compiling AST nodes into SQL strings.
6036
- * Specific dialects should extend this class and implement dialect-specific logic.
5980
+ * Reusable SQL implementation built on the structural Dialect contract.
5981
+ * Dialects extend this only when its standard SELECT/DML behavior is useful.
6037
5982
  */
6038
- declare abstract class SqlDialectBase extends Dialect {
5983
+ declare abstract class SqlDialectBase extends DialectBase {
6039
5984
  abstract quoteIdentifier(id: string): string;
6040
5985
  protected paginationStrategy: PaginationStrategy;
6041
5986
  protected returningStrategy: ReturningStrategy;
@@ -6085,7 +6030,7 @@ declare abstract class SqlDialectBase extends Dialect {
6085
6030
  /**
6086
6031
  * MySQL dialect implementation
6087
6032
  */
6088
- declare class MySqlDialect extends SqlDialectBase {
6033
+ declare class MySqlDialect extends SqlDialectBase implements ProcedureCompiler {
6089
6034
  protected readonly dialect = "mysql";
6090
6035
  /**
6091
6036
  * Creates a new MySqlDialect instance
@@ -6110,7 +6055,7 @@ declare class MySqlDialect extends SqlDialectBase {
6110
6055
  /**
6111
6056
  * Microsoft SQL Server dialect implementation
6112
6057
  */
6113
- declare class SqlServerDialect extends SqlDialectBase {
6058
+ declare class SqlServerDialect extends SqlDialectBase implements ProcedureCompiler {
6114
6059
  protected readonly dialect = "mssql";
6115
6060
  /**
6116
6061
  * Creates a new SqlServerDialect instance
@@ -6183,13 +6128,12 @@ declare class SqliteDialect extends SqlDialectBase {
6183
6128
  protected formatReturningColumns(returning: ColumnNode[]): string;
6184
6129
  protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
6185
6130
  supportsDmlReturningClause(): boolean;
6186
- compileProcedureCall(_ast: ProcedureCallNode): CompiledProcedureCall;
6187
6131
  }
6188
6132
 
6189
6133
  /**
6190
6134
  * PostgreSQL dialect implementation
6191
6135
  */
6192
- declare class PostgresDialect extends SqlDialectBase {
6136
+ declare class PostgresDialect extends SqlDialectBase implements ProcedureCompiler {
6193
6137
  protected readonly dialect = "postgres";
6194
6138
  /**
6195
6139
  * Creates a new PostgresDialect instance
@@ -10521,4 +10465,4 @@ declare class BulkUpsertExecutor extends BulkBaseExecutor<UpsertExecutorOptions>
10521
10465
  }
10522
10466
  declare function bulkUpsert<TTable extends TableDef>(session: OrmSession, table: TTable, rows: InsertRow[], options?: BulkUpsertOptions): Promise<BulkResult>;
10523
10467
 
10524
- 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 BetterSqlite3ClientLike, type BetterSqlite3Statement, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, type BulkBaseOptions, type BulkConcurrency, BulkDeleteExecutor, type BulkDeleteOptions, BulkInsertExecutor, type BulkInsertOptions, type BulkResult, BulkUpdateExecutor, type BulkUpdateOptions, BulkUpsertExecutor, type BulkUpsertOptions, 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 ChunkCompleteInfo, type ChunkOutcome, 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, DefaultMorphManyCollection, DefaultMorphOneReference, DefaultMorphToReference, 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, type InsertRow, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type IsDistinctExpressionNode, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, MorphMany, type MorphManyOptions, type MorphManyRelation, MorphOne, type MorphOneOptions, type MorphOneRelation, MorphTo, type MorphToOptions, type MorphToRelation, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NotExpressionNode, 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 TableHookResolver, 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, type UpdateRow, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type VectorInput, type VectorMetric, 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, bulkDelete, bulkDeleteWhere, bulkInsert, bulkUpdate, bulkUpdateWhere, bulkUpsert, 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, cosineDistance, cot, count, countAll, createApiComponentsSection, createBetterSqlite3Executor, 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, dotProduct, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, euclideanDistance, 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, innerProduct, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isDistinctFrom, isExpressionSelectionNode, isFunctionNode, isMorphRelation, isNotDistinctFrom, isNotNull, isNull, isNullableColumn, isOperandNode, isSingleTargetRelation, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, l1Distance, l2Distance, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, loadMorphManyRelation, loadMorphOneRelation, loadMorphToRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, manhattanDistance, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, morphMany, morphOne, morphTo, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, not, 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, vectorDistance, vectorMatch, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
10468
+ 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 BetterSqlite3ClientLike, type BetterSqlite3Statement, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, type BulkBaseOptions, type BulkConcurrency, BulkDeleteExecutor, type BulkDeleteOptions, BulkInsertExecutor, type BulkInsertOptions, type BulkResult, BulkUpdateExecutor, type BulkUpdateOptions, BulkUpsertExecutor, type BulkUpsertOptions, 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 ChunkCompleteInfo, type ChunkOutcome, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnToTs, type ColumnType, type CompiledProcedureCall, type CompiledQuery, type CompilerContext, 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, DefaultMorphManyCollection, DefaultMorphOneReference, DefaultMorphToReference, DefaultTypeStrategy, type DefaultValue, type DeleteCompiler, DeleteQueryBuilder, type Dialect, DialectBase, DialectFactory, type DialectKey, 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, type InsertCompiler, InsertQueryBuilder, type InsertRow, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type IsDistinctExpressionNode, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, MorphMany, type MorphManyOptions, type MorphManyRelation, MorphOne, type MorphOneOptions, type MorphOneRelation, MorphTo, type MorphToOptions, type MorphToRelation, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NotExpressionNode, 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 ProcedureCompiler, 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, type SelectCompiler, 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 TableHookResolver, 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 UpdateCompiler, type UpdateDto, UpdateQueryBuilder, type UpdateRow, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type VectorInput, type VectorMetric, 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, bulkDelete, bulkDeleteWhere, bulkInsert, bulkUpdate, bulkUpdateWhere, bulkUpsert, 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, cosineDistance, cot, count, countAll, createApiComponentsSection, createBetterSqlite3Executor, 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, dotProduct, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, euclideanDistance, 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, innerProduct, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isDistinctFrom, isExpressionSelectionNode, isFunctionNode, isMorphRelation, isNotDistinctFrom, isNotNull, isNull, isNullableColumn, isOperandNode, isProcedureCompiler, isSingleTargetRelation, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, l1Distance, l2Distance, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, loadMorphManyRelation, loadMorphOneRelation, loadMorphToRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, manhattanDistance, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, morphMany, morphOne, morphTo, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, not, 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, requireProcedureCompiler, resolveDialectInput, 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, vectorDistance, vectorMatch, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };