metal-orm 1.1.26 → 1.1.28

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
@@ -6284,42 +6284,43 @@ interface DatabaseSchema {
6284
6284
 
6285
6285
  /** The name of a database dialect. */
6286
6286
  type DialectName = 'postgres' | 'mysql' | 'sqlite' | 'mssql' | (string & {});
6287
- /** Interface for schema dialect implementations that handle database-specific DDL operations. */
6287
+ interface DropTableCapability {
6288
+ compile(table: DatabaseTable): string[];
6289
+ warning?(table: DatabaseTable): string | undefined;
6290
+ }
6291
+ interface DropColumnCapability {
6292
+ compile(table: DatabaseTable, column: string): string[];
6293
+ warning?(table: DatabaseTable, column: string): string | undefined;
6294
+ }
6295
+ interface DropIndexCapability {
6296
+ compile(table: DatabaseTable, index: string): string[];
6297
+ warning?(table: DatabaseTable, index: string): string | undefined;
6298
+ }
6299
+ interface AlterColumnCapability {
6300
+ compile(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string[];
6301
+ warning?(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string | undefined;
6302
+ }
6303
+ /** Explicit DDL mutation capabilities supported by a schema dialect. */
6304
+ interface SchemaMutationCapabilities {
6305
+ dropTable?: DropTableCapability;
6306
+ dropColumn?: DropColumnCapability;
6307
+ dropIndex?: DropIndexCapability;
6308
+ alterColumn?: AlterColumnCapability;
6309
+ }
6310
+ /** Structural contract for database-specific DDL rendering. */
6288
6311
  interface SchemaDialect {
6289
- /** The name of the dialect. */
6290
6312
  readonly name: DialectName;
6291
- /** Quotes an identifier for use in SQL. */
6313
+ readonly mutations: SchemaMutationCapabilities;
6292
6314
  quoteIdentifier(id: string): string;
6293
- /** Formats the table name for SQL. */
6294
6315
  formatTableName(table: TableDef | DatabaseTable): string;
6295
- /** Renders the column type for SQL. */
6296
6316
  renderColumnType(column: ColumnDef): string;
6297
- /** Renders the default value for SQL. */
6298
6317
  renderDefault(value: unknown, column: ColumnDef): string;
6299
- /** Renders the auto-increment clause for SQL. */
6300
6318
  renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6301
- /** Renders a foreign key reference for SQL. */
6302
6319
  renderReference(ref: ForeignKeyReference, table: TableDef): string;
6303
- /** Renders an index for SQL. */
6304
6320
  renderIndex(table: TableDef, index: IndexDef): string;
6305
- /** Renders table options for SQL. */
6306
6321
  renderTableOptions(table: TableDef): string | undefined;
6307
- /** Checks if the dialect supports partial indexes. */
6308
6322
  supportsPartialIndexes(): boolean;
6309
- /** Checks if the dialect prefers inline primary key auto-increment. */
6310
6323
  preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6311
- /** Generates SQL to drop a column. */
6312
- dropColumnSql?(table: DatabaseTable, column: string): string[];
6313
- /** Generates SQL to drop an index. */
6314
- dropIndexSql?(table: DatabaseTable, index: string): string[];
6315
- /** Generates SQL to drop a table. */
6316
- dropTableSql?(table: DatabaseTable): string[];
6317
- /** Returns a warning message for dropping a column. */
6318
- warnDropColumn?(table: DatabaseTable, column: string): string | undefined;
6319
- /** Generates SQL to alter a column. */
6320
- alterColumnSql?(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string[];
6321
- /** Returns a warning message for altering a column. */
6322
- warnAlterColumn?(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string | undefined;
6323
6324
  }
6324
6325
 
6325
6326
  /** Result of generating schema SQL. */
@@ -6378,9 +6379,7 @@ declare const executeSchemaSql: (executor: DbExecutor, tables: TableDef[], diale
6378
6379
  */
6379
6380
  declare const executeSchemaSqlFor: (executor: DbExecutor, dialect: SchemaDialect, ...tables: TableDef[]) => Promise<void>;
6380
6381
 
6381
- /** The kind of schema change. */
6382
6382
  type SchemaChangeKind = 'createTable' | 'dropTable' | 'addColumn' | 'dropColumn' | 'alterColumn' | 'addIndex' | 'dropIndex';
6383
- /** Represents a single schema change. */
6384
6383
  interface SchemaChange {
6385
6384
  kind: SchemaChangeKind;
6386
6385
  table: string;
@@ -6388,38 +6387,17 @@ interface SchemaChange {
6388
6387
  statements: string[];
6389
6388
  safe: boolean;
6390
6389
  }
6391
- /** Represents a plan of schema changes. */
6392
6390
  interface SchemaPlan {
6393
6391
  changes: SchemaChange[];
6394
6392
  warnings: string[];
6395
6393
  }
6396
- /** Options for schema diffing. */
6397
6394
  interface SchemaDiffOptions {
6398
- /** Allow destructive operations (drops) */
6399
6395
  allowDestructive?: boolean;
6400
6396
  }
6401
- /**
6402
- * Computes the differences between expected and actual database schemas.
6403
- * @param expectedTables - The expected table definitions.
6404
- * @param actualSchema - The actual database schema.
6405
- * @param dialect - The schema dialect.
6406
- * @param options - Options for the diff.
6407
- * @returns The schema plan with changes and warnings.
6408
- */
6409
6397
  declare const diffSchema: (expectedTables: TableDef[], actualSchema: DatabaseSchema, dialect: SchemaDialect, options?: SchemaDiffOptions) => SchemaPlan;
6410
- /** Options for schema synchronization. */
6411
6398
  interface SynchronizeOptions extends SchemaDiffOptions {
6412
6399
  dryRun?: boolean;
6413
6400
  }
6414
- /**
6415
- * Synchronizes the database schema with the expected tables.
6416
- * @param expectedTables - The expected table definitions.
6417
- * @param actualSchema - The actual database schema.
6418
- * @param dialect - The schema dialect.
6419
- * @param executor - The database executor.
6420
- * @param options - Options for synchronization.
6421
- * @returns The schema plan with changes and warnings.
6422
- */
6423
6401
  declare const synchronizeSchema: (expectedTables: TableDef[], actualSchema: DatabaseSchema, dialect: SchemaDialect, executor: DbExecutor, options?: SynchronizeOptions) => Promise<SchemaPlan>;
6424
6402
 
6425
6403
  /**
@@ -6458,6 +6436,134 @@ interface SchemaIntrospector {
6458
6436
  */
6459
6437
  declare const introspectSchema: (executor: DbExecutor, dialect: DialectName, options?: IntrospectOptions) => Promise<DatabaseSchema>;
6460
6438
 
6439
+ /**
6440
+ * Abstraction for "how do I turn values into SQL literals".
6441
+ * Implemented or configured by each dialect.
6442
+ */
6443
+ interface LiteralFormatter {
6444
+ formatLiteral(value: unknown): string;
6445
+ }
6446
+ /**
6447
+ * Declarative options for building a LiteralFormatter.
6448
+ * Dialects configure behavior by data, not by being hard-coded here.
6449
+ */
6450
+ interface LiteralFormatOptions {
6451
+ nullLiteral?: string;
6452
+ booleanTrue?: string;
6453
+ booleanFalse?: string;
6454
+ numberFormatter?: (value: number) => string;
6455
+ dateFormatter?: (value: Date) => string;
6456
+ stringWrapper?: (escaped: string) => string;
6457
+ jsonWrapper?: (escaped: string) => string;
6458
+ }
6459
+ /**
6460
+ * Factory for a value-based LiteralFormatter that:
6461
+ * - Handles type dispatch (null/number/boolean/date/string/object/raw)
6462
+ * - Delegates representation choices to options
6463
+ * - Knows nothing about concrete dialects
6464
+ */
6465
+ declare const createLiteralFormatter: (options?: LiteralFormatOptions) => LiteralFormatter;
6466
+
6467
+ interface SchemaDialectServices {
6468
+ readonly name: DialectName;
6469
+ quoteIdentifier(id: string): string;
6470
+ formatTableName(table: TableDef | DatabaseTable): string;
6471
+ renderDefault(value: unknown, column: ColumnDef): string;
6472
+ }
6473
+ interface SchemaDialectConfig {
6474
+ name: DialectName;
6475
+ quoteIdentifier(id: string): string;
6476
+ literalFormatter: LiteralFormatter;
6477
+ renderColumnType(column: ColumnDef, services: SchemaDialectServices): string;
6478
+ renderAutoIncrement(column: ColumnDef, table: TableDef, services: SchemaDialectServices): string | undefined;
6479
+ renderIndex(table: TableDef, index: IndexDef, services: SchemaDialectServices): string;
6480
+ renderDefault?(value: unknown, column: ColumnDef, services: SchemaDialectServices): string;
6481
+ renderReferenceSuffix?(ref: ForeignKeyReference, table: TableDef, services: SchemaDialectServices): string | undefined;
6482
+ renderTableOptions?(table: TableDef, services: SchemaDialectServices): string | undefined;
6483
+ supportsPartialIndexes?: boolean;
6484
+ preferInlinePkAutoincrement?(column: ColumnDef, table: TableDef, pk: string[], services: SchemaDialectServices): boolean;
6485
+ mutations?: (services: SchemaDialectServices) => SchemaMutationCapabilities;
6486
+ }
6487
+ /**
6488
+ * Assembles a complete schema dialect from independent rendering functions and
6489
+ * mutation capabilities. No inheritance participates in the DDL path.
6490
+ */
6491
+ declare const composeSchemaDialect: (config: SchemaDialectConfig) => SchemaDialect;
6492
+ declare const createStandardDropTableCapability: (services: SchemaDialectServices) => NonNullable<SchemaMutationCapabilities["dropTable"]>;
6493
+ declare const createStandardDropColumnCapability: (services: SchemaDialectServices) => NonNullable<SchemaMutationCapabilities["dropColumn"]>;
6494
+
6495
+ declare const createPostgresSchemaDialect: () => SchemaDialect;
6496
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6497
+ declare class PostgresSchemaDialect implements SchemaDialect {
6498
+ private readonly delegate;
6499
+ readonly name: DialectName;
6500
+ readonly mutations: SchemaMutationCapabilities;
6501
+ quoteIdentifier(id: string): string;
6502
+ formatTableName(table: TableDef | DatabaseTable): string;
6503
+ renderColumnType(column: ColumnDef): string;
6504
+ renderDefault(value: unknown, column: ColumnDef): string;
6505
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6506
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6507
+ renderIndex(table: TableDef, index: IndexDef): string;
6508
+ renderTableOptions(table: TableDef): string | undefined;
6509
+ supportsPartialIndexes(): boolean;
6510
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6511
+ }
6512
+
6513
+ declare const createMySqlSchemaDialect: () => SchemaDialect;
6514
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6515
+ declare class MySqlSchemaDialect implements SchemaDialect {
6516
+ private readonly delegate;
6517
+ readonly name: DialectName;
6518
+ readonly mutations: SchemaMutationCapabilities;
6519
+ quoteIdentifier(id: string): string;
6520
+ formatTableName(table: TableDef | DatabaseTable): string;
6521
+ renderColumnType(column: ColumnDef): string;
6522
+ renderDefault(value: unknown, column: ColumnDef): string;
6523
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6524
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6525
+ renderIndex(table: TableDef, index: IndexDef): string;
6526
+ renderTableOptions(table: TableDef): string | undefined;
6527
+ supportsPartialIndexes(): boolean;
6528
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6529
+ }
6530
+
6531
+ declare const createSqliteSchemaDialect: () => SchemaDialect;
6532
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6533
+ declare class SQLiteSchemaDialect implements SchemaDialect {
6534
+ private readonly delegate;
6535
+ readonly name: DialectName;
6536
+ readonly mutations: SchemaMutationCapabilities;
6537
+ quoteIdentifier(id: string): string;
6538
+ formatTableName(table: TableDef | DatabaseTable): string;
6539
+ renderColumnType(column: ColumnDef): string;
6540
+ renderDefault(value: unknown, column: ColumnDef): string;
6541
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6542
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6543
+ renderIndex(table: TableDef, index: IndexDef): string;
6544
+ renderTableOptions(table: TableDef): string | undefined;
6545
+ supportsPartialIndexes(): boolean;
6546
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6547
+ }
6548
+
6549
+ declare const createMssqlSchemaDialect: () => SchemaDialect;
6550
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6551
+ declare class MSSqlSchemaDialect implements SchemaDialect {
6552
+ private readonly delegate;
6553
+ readonly name: DialectName;
6554
+ readonly mutations: SchemaMutationCapabilities;
6555
+ quoteIdentifier(id: string): string;
6556
+ formatTableName(table: TableDef | DatabaseTable): string;
6557
+ renderColumnType(column: ColumnDef): string;
6558
+ renderDefault(value: unknown, column: ColumnDef): string;
6559
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6560
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6561
+ renderIndex(table: TableDef, index: IndexDef): string;
6562
+ renderTableOptions(table: TableDef): string | undefined;
6563
+ supportsPartialIndexes(): boolean;
6564
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6565
+ }
6566
+
6461
6567
  /**
6462
6568
  * Registers a schema introspector for a dialect.
6463
6569
  * @param dialect - The dialect name.
@@ -10529,4 +10635,4 @@ declare class BulkUpsertExecutor extends BulkBaseExecutor<UpsertExecutorOptions>
10529
10635
  }
10530
10636
  declare function bulkUpsert<TTable extends TableDef>(session: OrmSession, table: TTable, rows: InsertRow[], options?: BulkUpsertOptions): Promise<BulkResult>;
10531
10637
 
10532
- 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, DialectFactory, type DialectFactoryFn, 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, MssqlDeleteCompiler, MssqlInsertCompiler, type MssqlOutputPrefix, MssqlOutputStrategy, MssqlProcedureCompiler, MssqlSelectCompiler, MssqlUpdateCompiler, MySqlDialect, type MySqlDialectImplementation, MySqlProcedureCompiler, MySqlUpsertStrategy, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, NoReturningStrategy, NoUpsertStrategy, 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 PaginationStrategy, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, type PostgresDialectImplementation, PostgresProcedureCompiler, PostgresReturningStrategy, PostgresUpsertStrategy, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureCompiler, type ProcedureCompilerServices, 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 QuoteIdentifier, 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, type ReturningStrategy, 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, type SqlAstCompiler, type SqlCompilerAssemblyContext, type SqlCompilerFactory, type SqlCompilerSet, type SqlDialectComposition, type SqlDialectConfig, type SqlDialectExpressionApi, type SqlDialectRuntimeServices, SqlServerDialect, type SqlServerDialectImplementation, type SqliteClientLike, SqliteDialect, SqliteReturningStrategy, SqliteUpsertStrategy, type StandardColumnType, StandardDeleteCompiler, StandardInsertCompiler, StandardLimitOffsetPagination, StandardReturningStrategy, StandardSelectCompiler, type StandardSqlCompilerServices, StandardSqlSourceCompiler, StandardTableFunctionStrategy, StandardUpdateCompiler, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableFunctionRenderContext, type TableFunctionRenderer, type TableFunctionStrategy, 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, type UpsertCompilationServices, type UpsertStrategy, 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, composeSqlDialect, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cosineDistance, cot, count, countAll, createApiComponentsSection, createBetterSqlite3Executor, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlCompilerSet, createMssqlExecutor, createMySqlDialect, createMysqlExecutor, createPooledExecutorFactory, createPostgresDialect, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqlDialect, createSqlServerDialect, createSqliteDialect, 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 };
10638
+ export { type AliasRefNode, Alphanumeric, type AlterColumnCapability, 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, DialectFactory, type DialectFactoryFn, type DialectKey, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type DropColumnCapability, type DropIndexCapability, type DropTableCapability, 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 LiteralFormatOptions, type LiteralFormatter, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, MSSqlSchemaDialect, type ManyToManyCollection, MemoryCacheAdapter, MorphMany, type MorphManyOptions, type MorphManyRelation, MorphOne, type MorphOneOptions, type MorphOneRelation, MorphTo, type MorphToOptions, type MorphToRelation, type MoveOptions, type MssqlClientLike, MssqlDeleteCompiler, MssqlInsertCompiler, type MssqlOutputPrefix, MssqlOutputStrategy, MssqlProcedureCompiler, MssqlSelectCompiler, MssqlUpdateCompiler, MySqlDialect, type MySqlDialectImplementation, MySqlProcedureCompiler, MySqlSchemaDialect, MySqlUpsertStrategy, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, NoReturningStrategy, NoUpsertStrategy, 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 PaginationStrategy, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, type PostgresDialectImplementation, PostgresProcedureCompiler, PostgresReturningStrategy, PostgresSchemaDialect, PostgresUpsertStrategy, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureCompiler, type ProcedureCompilerServices, 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 QuoteIdentifier, 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, type ReturningStrategy, SQLiteSchemaDialect, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDialect, type SchemaDialectConfig, type SchemaDialectServices, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaMutationCapabilities, type SchemaPlan, type SelectCompiler, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, type SqlAstCompiler, type SqlCompilerAssemblyContext, type SqlCompilerFactory, type SqlCompilerSet, type SqlDialectComposition, type SqlDialectConfig, type SqlDialectExpressionApi, type SqlDialectRuntimeServices, SqlServerDialect, type SqlServerDialectImplementation, type SqliteClientLike, SqliteDialect, SqliteReturningStrategy, SqliteUpsertStrategy, type StandardColumnType, StandardDeleteCompiler, StandardInsertCompiler, StandardLimitOffsetPagination, StandardReturningStrategy, StandardSelectCompiler, type StandardSqlCompilerServices, StandardSqlSourceCompiler, StandardTableFunctionStrategy, StandardUpdateCompiler, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableFunctionRenderContext, type TableFunctionRenderer, type TableFunctionStrategy, 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, type UpsertCompilationServices, type UpsertStrategy, 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, composeSchemaDialect, composeSqlDialect, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cosineDistance, cot, count, countAll, createApiComponentsSection, createBetterSqlite3Executor, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createLiteralFormatter, createMssqlCompilerSet, createMssqlExecutor, createMssqlSchemaDialect, createMySqlDialect, createMySqlSchemaDialect, createMysqlExecutor, createPooledExecutorFactory, createPostgresDialect, createPostgresExecutor, createPostgresSchemaDialect, createQueryLoggingExecutor, createRef, createSqlDialect, createSqlServerDialect, createSqliteDialect, createSqliteExecutor, createSqliteSchemaDialect, createStandardDropColumnCapability, createStandardDropTableCapability, 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 };
package/dist/index.d.ts CHANGED
@@ -6284,42 +6284,43 @@ interface DatabaseSchema {
6284
6284
 
6285
6285
  /** The name of a database dialect. */
6286
6286
  type DialectName = 'postgres' | 'mysql' | 'sqlite' | 'mssql' | (string & {});
6287
- /** Interface for schema dialect implementations that handle database-specific DDL operations. */
6287
+ interface DropTableCapability {
6288
+ compile(table: DatabaseTable): string[];
6289
+ warning?(table: DatabaseTable): string | undefined;
6290
+ }
6291
+ interface DropColumnCapability {
6292
+ compile(table: DatabaseTable, column: string): string[];
6293
+ warning?(table: DatabaseTable, column: string): string | undefined;
6294
+ }
6295
+ interface DropIndexCapability {
6296
+ compile(table: DatabaseTable, index: string): string[];
6297
+ warning?(table: DatabaseTable, index: string): string | undefined;
6298
+ }
6299
+ interface AlterColumnCapability {
6300
+ compile(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string[];
6301
+ warning?(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string | undefined;
6302
+ }
6303
+ /** Explicit DDL mutation capabilities supported by a schema dialect. */
6304
+ interface SchemaMutationCapabilities {
6305
+ dropTable?: DropTableCapability;
6306
+ dropColumn?: DropColumnCapability;
6307
+ dropIndex?: DropIndexCapability;
6308
+ alterColumn?: AlterColumnCapability;
6309
+ }
6310
+ /** Structural contract for database-specific DDL rendering. */
6288
6311
  interface SchemaDialect {
6289
- /** The name of the dialect. */
6290
6312
  readonly name: DialectName;
6291
- /** Quotes an identifier for use in SQL. */
6313
+ readonly mutations: SchemaMutationCapabilities;
6292
6314
  quoteIdentifier(id: string): string;
6293
- /** Formats the table name for SQL. */
6294
6315
  formatTableName(table: TableDef | DatabaseTable): string;
6295
- /** Renders the column type for SQL. */
6296
6316
  renderColumnType(column: ColumnDef): string;
6297
- /** Renders the default value for SQL. */
6298
6317
  renderDefault(value: unknown, column: ColumnDef): string;
6299
- /** Renders the auto-increment clause for SQL. */
6300
6318
  renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6301
- /** Renders a foreign key reference for SQL. */
6302
6319
  renderReference(ref: ForeignKeyReference, table: TableDef): string;
6303
- /** Renders an index for SQL. */
6304
6320
  renderIndex(table: TableDef, index: IndexDef): string;
6305
- /** Renders table options for SQL. */
6306
6321
  renderTableOptions(table: TableDef): string | undefined;
6307
- /** Checks if the dialect supports partial indexes. */
6308
6322
  supportsPartialIndexes(): boolean;
6309
- /** Checks if the dialect prefers inline primary key auto-increment. */
6310
6323
  preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6311
- /** Generates SQL to drop a column. */
6312
- dropColumnSql?(table: DatabaseTable, column: string): string[];
6313
- /** Generates SQL to drop an index. */
6314
- dropIndexSql?(table: DatabaseTable, index: string): string[];
6315
- /** Generates SQL to drop a table. */
6316
- dropTableSql?(table: DatabaseTable): string[];
6317
- /** Returns a warning message for dropping a column. */
6318
- warnDropColumn?(table: DatabaseTable, column: string): string | undefined;
6319
- /** Generates SQL to alter a column. */
6320
- alterColumnSql?(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string[];
6321
- /** Returns a warning message for altering a column. */
6322
- warnAlterColumn?(table: TableDef, column: ColumnDef, actualColumn: DatabaseColumn, diff: ColumnDiff): string | undefined;
6323
6324
  }
6324
6325
 
6325
6326
  /** Result of generating schema SQL. */
@@ -6378,9 +6379,7 @@ declare const executeSchemaSql: (executor: DbExecutor, tables: TableDef[], diale
6378
6379
  */
6379
6380
  declare const executeSchemaSqlFor: (executor: DbExecutor, dialect: SchemaDialect, ...tables: TableDef[]) => Promise<void>;
6380
6381
 
6381
- /** The kind of schema change. */
6382
6382
  type SchemaChangeKind = 'createTable' | 'dropTable' | 'addColumn' | 'dropColumn' | 'alterColumn' | 'addIndex' | 'dropIndex';
6383
- /** Represents a single schema change. */
6384
6383
  interface SchemaChange {
6385
6384
  kind: SchemaChangeKind;
6386
6385
  table: string;
@@ -6388,38 +6387,17 @@ interface SchemaChange {
6388
6387
  statements: string[];
6389
6388
  safe: boolean;
6390
6389
  }
6391
- /** Represents a plan of schema changes. */
6392
6390
  interface SchemaPlan {
6393
6391
  changes: SchemaChange[];
6394
6392
  warnings: string[];
6395
6393
  }
6396
- /** Options for schema diffing. */
6397
6394
  interface SchemaDiffOptions {
6398
- /** Allow destructive operations (drops) */
6399
6395
  allowDestructive?: boolean;
6400
6396
  }
6401
- /**
6402
- * Computes the differences between expected and actual database schemas.
6403
- * @param expectedTables - The expected table definitions.
6404
- * @param actualSchema - The actual database schema.
6405
- * @param dialect - The schema dialect.
6406
- * @param options - Options for the diff.
6407
- * @returns The schema plan with changes and warnings.
6408
- */
6409
6397
  declare const diffSchema: (expectedTables: TableDef[], actualSchema: DatabaseSchema, dialect: SchemaDialect, options?: SchemaDiffOptions) => SchemaPlan;
6410
- /** Options for schema synchronization. */
6411
6398
  interface SynchronizeOptions extends SchemaDiffOptions {
6412
6399
  dryRun?: boolean;
6413
6400
  }
6414
- /**
6415
- * Synchronizes the database schema with the expected tables.
6416
- * @param expectedTables - The expected table definitions.
6417
- * @param actualSchema - The actual database schema.
6418
- * @param dialect - The schema dialect.
6419
- * @param executor - The database executor.
6420
- * @param options - Options for synchronization.
6421
- * @returns The schema plan with changes and warnings.
6422
- */
6423
6401
  declare const synchronizeSchema: (expectedTables: TableDef[], actualSchema: DatabaseSchema, dialect: SchemaDialect, executor: DbExecutor, options?: SynchronizeOptions) => Promise<SchemaPlan>;
6424
6402
 
6425
6403
  /**
@@ -6458,6 +6436,134 @@ interface SchemaIntrospector {
6458
6436
  */
6459
6437
  declare const introspectSchema: (executor: DbExecutor, dialect: DialectName, options?: IntrospectOptions) => Promise<DatabaseSchema>;
6460
6438
 
6439
+ /**
6440
+ * Abstraction for "how do I turn values into SQL literals".
6441
+ * Implemented or configured by each dialect.
6442
+ */
6443
+ interface LiteralFormatter {
6444
+ formatLiteral(value: unknown): string;
6445
+ }
6446
+ /**
6447
+ * Declarative options for building a LiteralFormatter.
6448
+ * Dialects configure behavior by data, not by being hard-coded here.
6449
+ */
6450
+ interface LiteralFormatOptions {
6451
+ nullLiteral?: string;
6452
+ booleanTrue?: string;
6453
+ booleanFalse?: string;
6454
+ numberFormatter?: (value: number) => string;
6455
+ dateFormatter?: (value: Date) => string;
6456
+ stringWrapper?: (escaped: string) => string;
6457
+ jsonWrapper?: (escaped: string) => string;
6458
+ }
6459
+ /**
6460
+ * Factory for a value-based LiteralFormatter that:
6461
+ * - Handles type dispatch (null/number/boolean/date/string/object/raw)
6462
+ * - Delegates representation choices to options
6463
+ * - Knows nothing about concrete dialects
6464
+ */
6465
+ declare const createLiteralFormatter: (options?: LiteralFormatOptions) => LiteralFormatter;
6466
+
6467
+ interface SchemaDialectServices {
6468
+ readonly name: DialectName;
6469
+ quoteIdentifier(id: string): string;
6470
+ formatTableName(table: TableDef | DatabaseTable): string;
6471
+ renderDefault(value: unknown, column: ColumnDef): string;
6472
+ }
6473
+ interface SchemaDialectConfig {
6474
+ name: DialectName;
6475
+ quoteIdentifier(id: string): string;
6476
+ literalFormatter: LiteralFormatter;
6477
+ renderColumnType(column: ColumnDef, services: SchemaDialectServices): string;
6478
+ renderAutoIncrement(column: ColumnDef, table: TableDef, services: SchemaDialectServices): string | undefined;
6479
+ renderIndex(table: TableDef, index: IndexDef, services: SchemaDialectServices): string;
6480
+ renderDefault?(value: unknown, column: ColumnDef, services: SchemaDialectServices): string;
6481
+ renderReferenceSuffix?(ref: ForeignKeyReference, table: TableDef, services: SchemaDialectServices): string | undefined;
6482
+ renderTableOptions?(table: TableDef, services: SchemaDialectServices): string | undefined;
6483
+ supportsPartialIndexes?: boolean;
6484
+ preferInlinePkAutoincrement?(column: ColumnDef, table: TableDef, pk: string[], services: SchemaDialectServices): boolean;
6485
+ mutations?: (services: SchemaDialectServices) => SchemaMutationCapabilities;
6486
+ }
6487
+ /**
6488
+ * Assembles a complete schema dialect from independent rendering functions and
6489
+ * mutation capabilities. No inheritance participates in the DDL path.
6490
+ */
6491
+ declare const composeSchemaDialect: (config: SchemaDialectConfig) => SchemaDialect;
6492
+ declare const createStandardDropTableCapability: (services: SchemaDialectServices) => NonNullable<SchemaMutationCapabilities["dropTable"]>;
6493
+ declare const createStandardDropColumnCapability: (services: SchemaDialectServices) => NonNullable<SchemaMutationCapabilities["dropColumn"]>;
6494
+
6495
+ declare const createPostgresSchemaDialect: () => SchemaDialect;
6496
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6497
+ declare class PostgresSchemaDialect implements SchemaDialect {
6498
+ private readonly delegate;
6499
+ readonly name: DialectName;
6500
+ readonly mutations: SchemaMutationCapabilities;
6501
+ quoteIdentifier(id: string): string;
6502
+ formatTableName(table: TableDef | DatabaseTable): string;
6503
+ renderColumnType(column: ColumnDef): string;
6504
+ renderDefault(value: unknown, column: ColumnDef): string;
6505
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6506
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6507
+ renderIndex(table: TableDef, index: IndexDef): string;
6508
+ renderTableOptions(table: TableDef): string | undefined;
6509
+ supportsPartialIndexes(): boolean;
6510
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6511
+ }
6512
+
6513
+ declare const createMySqlSchemaDialect: () => SchemaDialect;
6514
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6515
+ declare class MySqlSchemaDialect implements SchemaDialect {
6516
+ private readonly delegate;
6517
+ readonly name: DialectName;
6518
+ readonly mutations: SchemaMutationCapabilities;
6519
+ quoteIdentifier(id: string): string;
6520
+ formatTableName(table: TableDef | DatabaseTable): string;
6521
+ renderColumnType(column: ColumnDef): string;
6522
+ renderDefault(value: unknown, column: ColumnDef): string;
6523
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6524
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6525
+ renderIndex(table: TableDef, index: IndexDef): string;
6526
+ renderTableOptions(table: TableDef): string | undefined;
6527
+ supportsPartialIndexes(): boolean;
6528
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6529
+ }
6530
+
6531
+ declare const createSqliteSchemaDialect: () => SchemaDialect;
6532
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6533
+ declare class SQLiteSchemaDialect implements SchemaDialect {
6534
+ private readonly delegate;
6535
+ readonly name: DialectName;
6536
+ readonly mutations: SchemaMutationCapabilities;
6537
+ quoteIdentifier(id: string): string;
6538
+ formatTableName(table: TableDef | DatabaseTable): string;
6539
+ renderColumnType(column: ColumnDef): string;
6540
+ renderDefault(value: unknown, column: ColumnDef): string;
6541
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6542
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6543
+ renderIndex(table: TableDef, index: IndexDef): string;
6544
+ renderTableOptions(table: TableDef): string | undefined;
6545
+ supportsPartialIndexes(): boolean;
6546
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6547
+ }
6548
+
6549
+ declare const createMssqlSchemaDialect: () => SchemaDialect;
6550
+ /** Ergonomic facade; DDL rendering itself is pure composition. */
6551
+ declare class MSSqlSchemaDialect implements SchemaDialect {
6552
+ private readonly delegate;
6553
+ readonly name: DialectName;
6554
+ readonly mutations: SchemaMutationCapabilities;
6555
+ quoteIdentifier(id: string): string;
6556
+ formatTableName(table: TableDef | DatabaseTable): string;
6557
+ renderColumnType(column: ColumnDef): string;
6558
+ renderDefault(value: unknown, column: ColumnDef): string;
6559
+ renderAutoIncrement(column: ColumnDef, table: TableDef): string | undefined;
6560
+ renderReference(ref: Parameters<SchemaDialect['renderReference']>[0], table: TableDef): string;
6561
+ renderIndex(table: TableDef, index: IndexDef): string;
6562
+ renderTableOptions(table: TableDef): string | undefined;
6563
+ supportsPartialIndexes(): boolean;
6564
+ preferInlinePkAutoincrement(column: ColumnDef, table: TableDef, pk: string[]): boolean;
6565
+ }
6566
+
6461
6567
  /**
6462
6568
  * Registers a schema introspector for a dialect.
6463
6569
  * @param dialect - The dialect name.
@@ -10529,4 +10635,4 @@ declare class BulkUpsertExecutor extends BulkBaseExecutor<UpsertExecutorOptions>
10529
10635
  }
10530
10636
  declare function bulkUpsert<TTable extends TableDef>(session: OrmSession, table: TTable, rows: InsertRow[], options?: BulkUpsertOptions): Promise<BulkResult>;
10531
10637
 
10532
- 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, DialectFactory, type DialectFactoryFn, 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, MssqlDeleteCompiler, MssqlInsertCompiler, type MssqlOutputPrefix, MssqlOutputStrategy, MssqlProcedureCompiler, MssqlSelectCompiler, MssqlUpdateCompiler, MySqlDialect, type MySqlDialectImplementation, MySqlProcedureCompiler, MySqlUpsertStrategy, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, NoReturningStrategy, NoUpsertStrategy, 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 PaginationStrategy, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, type PostgresDialectImplementation, PostgresProcedureCompiler, PostgresReturningStrategy, PostgresUpsertStrategy, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureCompiler, type ProcedureCompilerServices, 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 QuoteIdentifier, 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, type ReturningStrategy, 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, type SqlAstCompiler, type SqlCompilerAssemblyContext, type SqlCompilerFactory, type SqlCompilerSet, type SqlDialectComposition, type SqlDialectConfig, type SqlDialectExpressionApi, type SqlDialectRuntimeServices, SqlServerDialect, type SqlServerDialectImplementation, type SqliteClientLike, SqliteDialect, SqliteReturningStrategy, SqliteUpsertStrategy, type StandardColumnType, StandardDeleteCompiler, StandardInsertCompiler, StandardLimitOffsetPagination, StandardReturningStrategy, StandardSelectCompiler, type StandardSqlCompilerServices, StandardSqlSourceCompiler, StandardTableFunctionStrategy, StandardUpdateCompiler, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableFunctionRenderContext, type TableFunctionRenderer, type TableFunctionStrategy, 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, type UpsertCompilationServices, type UpsertStrategy, 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, composeSqlDialect, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cosineDistance, cot, count, countAll, createApiComponentsSection, createBetterSqlite3Executor, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlCompilerSet, createMssqlExecutor, createMySqlDialect, createMysqlExecutor, createPooledExecutorFactory, createPostgresDialect, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqlDialect, createSqlServerDialect, createSqliteDialect, 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 };
10638
+ export { type AliasRefNode, Alphanumeric, type AlterColumnCapability, 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, DialectFactory, type DialectFactoryFn, type DialectKey, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type DropColumnCapability, type DropIndexCapability, type DropTableCapability, 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 LiteralFormatOptions, type LiteralFormatter, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, MSSqlSchemaDialect, type ManyToManyCollection, MemoryCacheAdapter, MorphMany, type MorphManyOptions, type MorphManyRelation, MorphOne, type MorphOneOptions, type MorphOneRelation, MorphTo, type MorphToOptions, type MorphToRelation, type MoveOptions, type MssqlClientLike, MssqlDeleteCompiler, MssqlInsertCompiler, type MssqlOutputPrefix, MssqlOutputStrategy, MssqlProcedureCompiler, MssqlSelectCompiler, MssqlUpdateCompiler, MySqlDialect, type MySqlDialectImplementation, MySqlProcedureCompiler, MySqlSchemaDialect, MySqlUpsertStrategy, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, NoReturningStrategy, NoUpsertStrategy, 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 PaginationStrategy, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, type PostgresDialectImplementation, PostgresProcedureCompiler, PostgresReturningStrategy, PostgresSchemaDialect, PostgresUpsertStrategy, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureCompiler, type ProcedureCompilerServices, 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 QuoteIdentifier, 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, type ReturningStrategy, SQLiteSchemaDialect, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDialect, type SchemaDialectConfig, type SchemaDialectServices, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaMutationCapabilities, type SchemaPlan, type SelectCompiler, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, type SqlAstCompiler, type SqlCompilerAssemblyContext, type SqlCompilerFactory, type SqlCompilerSet, type SqlDialectComposition, type SqlDialectConfig, type SqlDialectExpressionApi, type SqlDialectRuntimeServices, SqlServerDialect, type SqlServerDialectImplementation, type SqliteClientLike, SqliteDialect, SqliteReturningStrategy, SqliteUpsertStrategy, type StandardColumnType, StandardDeleteCompiler, StandardInsertCompiler, StandardLimitOffsetPagination, StandardReturningStrategy, StandardSelectCompiler, type StandardSqlCompilerServices, StandardSqlSourceCompiler, StandardTableFunctionStrategy, StandardUpdateCompiler, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableFunctionRenderContext, type TableFunctionRenderer, type TableFunctionStrategy, 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, type UpsertCompilationServices, type UpsertStrategy, 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, composeSchemaDialect, composeSqlDialect, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cosineDistance, cot, count, countAll, createApiComponentsSection, createBetterSqlite3Executor, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createLiteralFormatter, createMssqlCompilerSet, createMssqlExecutor, createMssqlSchemaDialect, createMySqlDialect, createMySqlSchemaDialect, createMysqlExecutor, createPooledExecutorFactory, createPostgresDialect, createPostgresExecutor, createPostgresSchemaDialect, createQueryLoggingExecutor, createRef, createSqlDialect, createSqlServerDialect, createSqliteDialect, createSqliteExecutor, createSqliteSchemaDialect, createStandardDropColumnCapability, createStandardDropTableCapability, 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 };