metal-orm 1.1.23 → 1.1.25

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.
Files changed (37) hide show
  1. package/dist/index.cjs +832 -583
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +281 -144
  4. package/dist/index.d.ts +281 -144
  5. package/dist/index.js +807 -583
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/core/dialect/base/returning-strategy.ts +40 -39
  9. package/src/core/dialect/base/sql-compiler-set.ts +33 -0
  10. package/src/core/dialect/base/sql-dialect.ts +125 -222
  11. package/src/core/dialect/base/standard-delete-compiler.ts +37 -0
  12. package/src/core/dialect/base/standard-insert-compiler.ts +49 -0
  13. package/src/core/dialect/base/standard-select-compiler.ts +82 -0
  14. package/src/core/dialect/base/standard-sql-services.ts +44 -0
  15. package/src/core/dialect/base/standard-sql-source-compiler.ts +88 -0
  16. package/src/core/dialect/base/standard-update-compiler.ts +53 -0
  17. package/src/core/dialect/base/upsert-strategy.ts +45 -0
  18. package/src/core/dialect/capabilities/procedure-compiler.ts +10 -8
  19. package/src/core/dialect/mssql/compiler-factory.ts +12 -0
  20. package/src/core/dialect/mssql/delete-compiler.ts +40 -0
  21. package/src/core/dialect/mssql/index.ts +24 -371
  22. package/src/core/dialect/mssql/insert-compiler.ts +112 -0
  23. package/src/core/dialect/mssql/output.ts +46 -0
  24. package/src/core/dialect/mssql/procedure-compiler.ts +81 -0
  25. package/src/core/dialect/mssql/select-compiler.ts +116 -0
  26. package/src/core/dialect/mssql/update-compiler.ts +37 -0
  27. package/src/core/dialect/mysql/index.ts +24 -117
  28. package/src/core/dialect/mysql/procedure-compiler.ts +67 -0
  29. package/src/core/dialect/mysql/upsert.ts +42 -0
  30. package/src/core/dialect/postgres/index.ts +34 -101
  31. package/src/core/dialect/postgres/procedure-compiler.ts +41 -0
  32. package/src/core/dialect/postgres/returning.ts +4 -0
  33. package/src/core/dialect/postgres/upsert.ts +43 -0
  34. package/src/core/dialect/sqlite/index.ts +15 -70
  35. package/src/core/dialect/sqlite/returning.ts +30 -0
  36. package/src/core/dialect/sqlite/upsert.ts +43 -0
  37. package/src/index.ts +28 -10
package/dist/index.d.ts CHANGED
@@ -5838,13 +5838,13 @@ interface CompiledProcedureCall extends CompiledQuery {
5838
5838
  names: string[];
5839
5839
  };
5840
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
- */
5841
+ /** Narrow SQL services consumed by reusable procedure compiler components. */
5842
+ interface ProcedureCompilerServices {
5843
+ quoteIdentifier(id: string): string;
5844
+ createCompilerContext(): CompilerContext;
5845
+ compileOperand(node: OperandNode, ctx: CompilerContext): string;
5846
+ }
5847
+ /** Optional dialect capability for stored-procedure compilation. */
5848
5848
  interface ProcedureCompiler {
5849
5849
  compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
5850
5850
  }
@@ -5953,213 +5953,350 @@ interface PaginationStrategy {
5953
5953
  */
5954
5954
  compilePagination(limit?: number, offset?: number): string;
5955
5955
  }
5956
-
5957
5956
  /**
5958
- * Strategy interface for handling RETURNING clauses in DML statements (INSERT, UPDATE, DELETE).
5959
- * Different SQL dialects have varying levels of support for RETURNING clauses.
5957
+ * Standard SQL pagination using LIMIT and OFFSET.
5958
+ * Implements the ANSI SQL-style pagination with LIMIT/OFFSET syntax.
5960
5959
  */
5961
- interface ReturningStrategy {
5960
+ declare class StandardLimitOffsetPagination implements PaginationStrategy {
5962
5961
  /**
5963
- * Compiles a RETURNING clause for DML statements.
5964
- * @param returning - Array of columns to return, or undefined if none.
5965
- * @param ctx - The compiler context for expression compilation.
5966
- * @returns SQL RETURNING clause or empty string if not supported.
5967
- * @throws Error if RETURNING is not supported by this dialect.
5962
+ * Compiles LIMIT/OFFSET pagination clause.
5963
+ * @param limit - The maximum number of rows to return.
5964
+ * @param offset - The number of rows to skip.
5965
+ * @returns SQL pagination clause with LIMIT and/or OFFSET.
5968
5966
  */
5967
+ compilePagination(limit?: number, offset?: number): string;
5968
+ }
5969
+
5970
+ type QuoteIdentifier = (id: string) => string;
5971
+ /** Backend-specific RETURNING/OUTPUT rendering strategy. */
5972
+ interface ReturningStrategy {
5973
+ compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext, quoteIdentifier: QuoteIdentifier): string;
5974
+ formatReturningColumns(returning: ColumnNode[], quoteIdentifier: QuoteIdentifier): string;
5975
+ }
5976
+ /** Default RETURNING strategy for dialects without support. */
5977
+ declare class NoReturningStrategy implements ReturningStrategy {
5978
+ compileReturning(returning: ColumnNode[] | undefined, _ctx: CompilerContext, _quoteIdentifier: QuoteIdentifier): string;
5979
+ formatReturningColumns(returning: ColumnNode[], quoteIdentifier: QuoteIdentifier): string;
5980
+ }
5981
+ /** Standard SQL RETURNING implementation with qualified column support. */
5982
+ declare class StandardReturningStrategy extends NoReturningStrategy {
5983
+ compileReturning(returning: ColumnNode[] | undefined, _ctx: CompilerContext, quoteIdentifier: QuoteIdentifier): string;
5984
+ }
5985
+
5986
+ /** Narrow services needed by backend-specific UPSERT implementations. */
5987
+ interface UpsertCompilationServices {
5988
+ getDialectName(): DialectName$1;
5989
+ quoteIdentifier(id: string): string;
5990
+ compileOperand(node: OperandNode, ctx: CompilerContext): string;
5991
+ compileExpression(node: ExpressionNode, ctx: CompilerContext): string;
5992
+ compileUpdateAssignments(assignments: UpdateAssignmentNode[], table: TableNode, ctx: CompilerContext): string;
5993
+ }
5994
+ /** Backend-specific INSERT conflict/upsert rendering strategy. */
5995
+ interface UpsertStrategy {
5996
+ compile(ast: InsertQueryNode, ctx: CompilerContext, services: UpsertCompilationServices): string;
5997
+ }
5998
+ /** Default strategy for dialects without UPSERT support. */
5999
+ declare class NoUpsertStrategy implements UpsertStrategy {
6000
+ compile(ast: InsertQueryNode, _ctx: CompilerContext, services: UpsertCompilationServices): string;
6001
+ }
6002
+
6003
+ /**
6004
+ * Narrow callback surface consumed by the standard SQL compilers.
6005
+ *
6006
+ * The compilers deliberately know nothing about SqlDialectBase or any concrete
6007
+ * backend class. A dialect can assemble these services through inheritance,
6008
+ * composition, or a plain object.
6009
+ */
6010
+ interface StandardSqlCompilerServices {
6011
+ getDialectName(): DialectName$1;
6012
+ getPaginationStrategy(): PaginationStrategy;
6013
+ getTableFunctionStrategy(): TableFunctionStrategy;
6014
+ quoteIdentifier(id: string): string;
6015
+ compileOperand(node: OperandNode, ctx: CompilerContext): string;
6016
+ compileExpression(node: ExpressionNode, ctx: CompilerContext): string;
6017
+ compileOrderingTerm(term: OrderingTerm, ctx: CompilerContext): string;
6018
+ normalizeSelectAst(ast: SelectQueryNode): SelectQueryNode;
6019
+ compileSelectAst(ast: SelectQueryNode, ctx: CompilerContext): string;
5969
6020
  compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext): string;
5970
- /**
5971
- * Formats column list for RETURNING clause.
5972
- * @param returning - Array of columns to format.
5973
- * @param quoteIdentifier - Function to quote identifiers according to dialect rules.
5974
- * @returns Formatted column list (e.g., "table.col1, table.col2").
5975
- */
5976
- formatReturningColumns(returning: ColumnNode[], quoteIdentifier: (id: string) => string): string;
6021
+ compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
6022
+ compileSetTarget(column: ColumnNode, table: TableNode): string;
6023
+ renderOrderByNulls(order: OrderByNode): string | undefined;
6024
+ renderOrderByCollation(order: OrderByNode): string | undefined;
6025
+ }
6026
+
6027
+ /** Shared FROM/table-source rendering used by the standard query compilers. */
6028
+ declare class StandardSqlSourceCompiler {
6029
+ private readonly services;
6030
+ constructor(services: StandardSqlCompilerServices);
6031
+ compileFrom(source: TableSourceNode, ctx?: CompilerContext): string;
6032
+ compileFunctionTable(fn: FunctionTableNode, ctx?: CompilerContext): string;
6033
+ compileDerivedTable(table: DerivedTableNode, ctx?: CompilerContext): string;
6034
+ compileTableSource(table: TableSourceNode): string;
6035
+ compileTableName(table: {
6036
+ name: string;
6037
+ schema?: string;
6038
+ }): string;
6039
+ compileTableReference(table: {
6040
+ name: string;
6041
+ schema?: string;
6042
+ alias?: string;
6043
+ }): string;
6044
+ stripTrailingSemicolon(sql: string): string;
6045
+ wrapSetOperand(sql: string): string;
5977
6046
  }
5978
6047
 
6048
+ interface SqlAstCompiler<TAst> {
6049
+ compile(ast: TAst, ctx: CompilerContext): string;
6050
+ }
6051
+ interface SqlCompilerSet {
6052
+ select: SqlAstCompiler<SelectQueryNode>;
6053
+ insert: SqlAstCompiler<InsertQueryNode>;
6054
+ update: SqlAstCompiler<UpdateQueryNode>;
6055
+ delete: SqlAstCompiler<DeleteQueryNode>;
6056
+ }
6057
+ interface SqlCompilerAssemblyContext {
6058
+ services: StandardSqlCompilerServices;
6059
+ sources: StandardSqlSourceCompiler;
6060
+ }
6061
+ /**
6062
+ * Allows a backend to replace only the standard query compilers whose SQL
6063
+ * grammar genuinely differs from the common implementation.
6064
+ */
6065
+ type SqlCompilerFactory = (context: SqlCompilerAssemblyContext) => Partial<SqlCompilerSet>;
6066
+
6067
+ interface SqlDialectBaseOptions {
6068
+ functionStrategy?: FunctionStrategy;
6069
+ tableFunctionStrategy?: TableFunctionStrategy;
6070
+ paginationStrategy?: PaginationStrategy;
6071
+ returningStrategy?: ReturningStrategy;
6072
+ upsertStrategy?: UpsertStrategy;
6073
+ compilerFactory?: SqlCompilerFactory;
6074
+ supportsDmlReturning?: boolean;
6075
+ }
5979
6076
  /**
5980
- * Reusable SQL implementation built on the structural Dialect contract.
5981
- * Dialects extend this only when its standard SELECT/DML behavior is useful.
6077
+ * Thin assembly base for dialects that use MetalORM's reusable SQL compiler pieces.
6078
+ *
6079
+ * Query orchestration, source rendering, upsert behavior and returning behavior are
6080
+ * injected components. Concrete dialects keep only syntax hooks that are genuinely
6081
+ * intrinsic to that backend.
5982
6082
  */
5983
6083
  declare abstract class SqlDialectBase extends DialectBase {
5984
6084
  abstract quoteIdentifier(id: string): string;
5985
- protected paginationStrategy: PaginationStrategy;
5986
- protected returningStrategy: ReturningStrategy;
6085
+ protected readonly paginationStrategy: PaginationStrategy;
6086
+ protected readonly returningStrategy: ReturningStrategy;
6087
+ protected readonly upsertStrategy: UpsertStrategy;
6088
+ private readonly dmlReturningSupported;
6089
+ private readonly sourceCompiler;
6090
+ private readonly standardUpdateCompiler;
6091
+ private readonly compilerSet;
6092
+ protected constructor(options?: SqlDialectBaseOptions);
6093
+ supportsDmlReturningClause(): boolean;
5987
6094
  protected compileSelectAst(ast: SelectQueryNode, ctx: CompilerContext): string;
5988
- private compileSelectWithSetOps;
5989
6095
  protected compileInsertAst(ast: InsertQueryNode, ctx: CompilerContext): string;
5990
- protected compileUpsertClause(ast: InsertQueryNode, _ctx: CompilerContext): string;
6096
+ protected compileUpdateAst(ast: UpdateQueryNode, ctx: CompilerContext): string;
6097
+ protected compileDeleteAst(ast: DeleteQueryNode, ctx: CompilerContext): string;
6098
+ protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
5991
6099
  protected compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext): string;
5992
- protected compileInsertSource(source: InsertSourceNode, ctx: CompilerContext): string;
5993
- protected compileInsertColumnList(columns: ColumnNode[]): string;
5994
6100
  protected ensureConflictColumns(clause: UpsertClause, message: string): void;
5995
- private compileSelectCore;
5996
- protected compileUpdateAst(ast: UpdateQueryNode, ctx: CompilerContext): string;
5997
- protected compileUpdateAssignments(assignments: {
5998
- column: ColumnNode;
5999
- value: OperandNode;
6000
- }[], table: TableNode, ctx: CompilerContext): string;
6101
+ protected compileUpdateAssignments(assignments: UpdateAssignmentNode[], table: TableNode, ctx: CompilerContext): string;
6001
6102
  protected compileSetTarget(column: ColumnNode, table: TableNode): string;
6002
6103
  protected compileQualifiedColumn(column: ColumnNode, table: TableNode): string;
6003
- protected compileDeleteAst(ast: DeleteQueryNode, ctx: CompilerContext): string;
6004
6104
  protected formatReturningColumns(returning: ColumnNode[]): string;
6005
- protected compileDistinct(ast: SelectQueryNode): string;
6006
- protected compileSelectColumns(ast: SelectQueryNode, ctx: CompilerContext): string;
6007
- protected compileFrom(ast: SelectQueryNode['from'], ctx?: CompilerContext): string;
6105
+ protected compileFrom(source: TableSourceNode, ctx?: CompilerContext): string;
6008
6106
  protected compileFunctionTable(fn: FunctionTableNode, ctx?: CompilerContext): string;
6009
6107
  protected compileDerivedTable(table: DerivedTableNode, ctx?: CompilerContext): string;
6010
6108
  protected compileTableSource(table: TableSourceNode): string;
6011
6109
  protected compileTableName(table: {
6012
6110
  name: string;
6013
6111
  schema?: string;
6014
- alias?: string;
6015
6112
  }): string;
6016
6113
  protected compileTableReference(table: {
6017
6114
  name: string;
6018
6115
  schema?: string;
6019
6116
  alias?: string;
6020
6117
  }): string;
6021
- private compileUpdateFromClause;
6022
- private compileDeleteUsingClause;
6023
- protected compileHaving(ast: SelectQueryNode, ctx: CompilerContext): string;
6024
6118
  protected stripTrailingSemicolon(sql: string): string;
6025
6119
  protected wrapSetOperand(sql: string): string;
6026
6120
  protected renderOrderByNulls(order: OrderByNode): string | undefined;
6027
6121
  protected renderOrderByCollation(order: OrderByNode): string | undefined;
6028
6122
  }
6029
6123
 
6030
- /**
6031
- * MySQL dialect implementation
6032
- */
6124
+ /** Standard SELECT orchestration, independent from any dialect class hierarchy. */
6125
+ declare class StandardSelectCompiler {
6126
+ private readonly services;
6127
+ private readonly sources;
6128
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6129
+ compile(ast: SelectQueryNode, ctx: CompilerContext): string;
6130
+ private compileCore;
6131
+ private compileColumns;
6132
+ private compileOrderBy;
6133
+ }
6134
+
6135
+ /** Standard INSERT orchestration, including VALUES/SELECT sources and upsert hook. */
6136
+ declare class StandardInsertCompiler {
6137
+ private readonly services;
6138
+ private readonly sources;
6139
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6140
+ compile(ast: InsertQueryNode, ctx: CompilerContext): string;
6141
+ compileSource(source: InsertSourceNode, ctx: CompilerContext): string;
6142
+ compileColumnList(columns: ColumnNode[]): string;
6143
+ ensureConflictColumns(clause: UpsertClause, message: string): void;
6144
+ }
6145
+
6146
+ /** Standard UPDATE orchestration, independent from concrete dialect classes. */
6147
+ declare class StandardUpdateCompiler {
6148
+ private readonly services;
6149
+ private readonly sources;
6150
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6151
+ compile(ast: UpdateQueryNode, ctx: CompilerContext): string;
6152
+ compileAssignments(assignments: {
6153
+ column: ColumnNode;
6154
+ value: OperandNode;
6155
+ }[], table: TableNode, ctx: CompilerContext): string;
6156
+ private compileFromClause;
6157
+ }
6158
+
6159
+ /** Standard DELETE orchestration, independent from concrete dialect classes. */
6160
+ declare class StandardDeleteCompiler {
6161
+ private readonly services;
6162
+ private readonly sources;
6163
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6164
+ compile(ast: DeleteQueryNode, ctx: CompilerContext): string;
6165
+ private compileUsingClause;
6166
+ }
6167
+
6168
+ declare class StandardTableFunctionStrategy implements TableFunctionStrategy {
6169
+ protected renderers: Map<string, TableFunctionRenderer>;
6170
+ protected add(key: string, renderer: TableFunctionRenderer): void;
6171
+ getRenderer(key: string): TableFunctionRenderer | undefined;
6172
+ }
6173
+
6174
+ /** MySQL dialect assembled from reusable compiler components. */
6033
6175
  declare class MySqlDialect extends SqlDialectBase implements ProcedureCompiler {
6034
6176
  protected readonly dialect = "mysql";
6035
- /**
6036
- * Creates a new MySqlDialect instance
6037
- */
6177
+ private readonly procedureCompiler;
6038
6178
  constructor();
6039
- /**
6040
- * Quotes an identifier using MySQL backtick syntax
6041
- * @param id - Identifier to quote
6042
- * @returns Quoted identifier
6043
- */
6044
6179
  quoteIdentifier(id: string): string;
6045
- /**
6046
- * Compiles JSON path expression using MySQL syntax
6047
- * @param node - JSON path node
6048
- * @returns MySQL JSON path expression
6049
- */
6050
6180
  protected compileJsonPath(node: JsonPathNode): string;
6051
- protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
6052
6181
  compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
6053
6182
  }
6054
6183
 
6055
- /**
6056
- * Microsoft SQL Server dialect implementation
6057
- */
6184
+ declare class MySqlUpsertStrategy implements UpsertStrategy {
6185
+ compile(ast: InsertQueryNode, ctx: CompilerContext, services: UpsertCompilationServices): string;
6186
+ }
6187
+
6188
+ declare class MySqlProcedureCompiler implements ProcedureCompiler {
6189
+ private readonly services;
6190
+ constructor(services: ProcedureCompilerServices);
6191
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
6192
+ }
6193
+
6194
+ /** Microsoft SQL Server dialect assembled from backend compiler components. */
6058
6195
  declare class SqlServerDialect extends SqlDialectBase implements ProcedureCompiler {
6059
6196
  protected readonly dialect = "mssql";
6060
- /**
6061
- * Creates a new SqlServerDialect instance
6062
- */
6197
+ private readonly procedureCompiler;
6063
6198
  constructor();
6064
- /**
6065
- * Quotes an identifier using SQL Server bracket syntax
6066
- * @param id - Identifier to quote
6067
- * @returns Quoted identifier
6068
- */
6069
6199
  quoteIdentifier(id: string): string;
6070
- /**
6071
- * Compiles JSON path expression using SQL Server syntax
6072
- * @param node - JSON path node
6073
- * @returns SQL Server JSON path expression
6074
- */
6075
6200
  protected compileJsonPath(node: JsonPathNode): string;
6076
- /**
6077
- * Formats parameter placeholders using SQL Server named parameter syntax
6078
- * @param index - Parameter index
6079
- * @returns Named parameter placeholder
6080
- */
6081
6201
  protected formatPlaceholder(index: number): string;
6082
- /**
6083
- * Compiles SELECT query AST to SQL Server SQL
6084
- * @param ast - Query AST
6085
- * @param ctx - Compiler context
6086
- * @returns SQL Server SQL string
6087
- */
6088
- protected compileSelectAst(ast: SelectQueryNode, ctx: CompilerContext): string;
6089
- protected compileDeleteAst(ast: DeleteQueryNode, ctx: CompilerContext): string;
6090
- protected compileUpdateAst(ast: UpdateQueryNode, ctx: CompilerContext): string;
6091
- private compileSelectCoreForMssql;
6202
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
6203
+ }
6204
+
6205
+ declare const createMssqlCompilerSet: SqlCompilerFactory;
6206
+
6207
+ declare class MssqlSelectCompiler implements SqlAstCompiler<SelectQueryNode> {
6208
+ private readonly services;
6209
+ private readonly sources;
6210
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6211
+ compile(ast: SelectQueryNode, ctx: CompilerContext): string;
6212
+ private compileCore;
6092
6213
  private compileOrderBy;
6093
6214
  private compilePagination;
6094
- supportsDmlReturningClause(): boolean;
6095
- protected compileReturning(returning: ColumnNode[] | undefined, _ctx: CompilerContext): string;
6096
- private compileOutputClause;
6097
- protected compileInsertAst(ast: InsertQueryNode, ctx: CompilerContext): string;
6098
- private compileMergeInsert;
6099
- private compileMergeUsingSource;
6100
- private compileInsertValues;
6101
6215
  private compileCtes;
6216
+ }
6217
+
6218
+ declare class MssqlInsertCompiler implements SqlAstCompiler<InsertQueryNode> {
6219
+ private readonly services;
6220
+ private readonly sources;
6221
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6222
+ compile(ast: InsertQueryNode, ctx: CompilerContext): string;
6223
+ private compileMerge;
6224
+ private compileMergeUsingSource;
6225
+ private compileInsertSource;
6226
+ }
6227
+
6228
+ declare class MssqlUpdateCompiler implements SqlAstCompiler<UpdateQueryNode> {
6229
+ private readonly services;
6230
+ private readonly sources;
6231
+ private readonly standardUpdate;
6232
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6233
+ compile(ast: UpdateQueryNode, ctx: CompilerContext): string;
6234
+ }
6235
+
6236
+ declare class MssqlDeleteCompiler implements SqlAstCompiler<DeleteQueryNode> {
6237
+ private readonly services;
6238
+ private readonly sources;
6239
+ private readonly output;
6240
+ constructor(services: StandardSqlCompilerServices, sources: StandardSqlSourceCompiler);
6241
+ compile(ast: DeleteQueryNode, ctx: CompilerContext): string;
6242
+ }
6243
+
6244
+ type MssqlOutputPrefix = 'inserted' | 'deleted';
6245
+ declare class MssqlOutputStrategy implements ReturningStrategy {
6246
+ compileReturning(returning: ColumnNode[] | undefined, _ctx: CompilerContext, quoteIdentifier: QuoteIdentifier): string;
6247
+ compileOutput(returning: ColumnNode[] | undefined, prefix: MssqlOutputPrefix, quoteIdentifier: QuoteIdentifier): string;
6248
+ formatReturningColumns(returning: ColumnNode[], quoteIdentifier: QuoteIdentifier): string;
6249
+ }
6250
+
6251
+ declare class MssqlProcedureCompiler implements ProcedureCompiler {
6252
+ private readonly services;
6253
+ constructor(services: ProcedureCompilerServices);
6102
6254
  compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
6103
6255
  }
6104
6256
 
6105
- /**
6106
- * SQLite dialect implementation
6107
- */
6257
+ /** SQLite dialect assembled from reusable compiler components. */
6108
6258
  declare class SqliteDialect extends SqlDialectBase {
6109
6259
  protected readonly dialect = "sqlite";
6110
- /**
6111
- * Creates a new SqliteDialect instance
6112
- */
6113
6260
  constructor();
6114
- /**
6115
- * Quotes an identifier using SQLite double-quote syntax
6116
- * @param id - Identifier to quote
6117
- * @returns Quoted identifier
6118
- */
6119
6261
  quoteIdentifier(id: string): string;
6120
- /**
6121
- * Compiles JSON path expression using SQLite syntax
6122
- * @param node - JSON path node
6123
- * @returns SQLite JSON path expression
6124
- */
6125
6262
  protected compileJsonPath(node: JsonPathNode): string;
6126
6263
  protected compileQualifiedColumn(column: ColumnNode, _table: TableNode): string;
6127
- protected compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext): string;
6128
- protected formatReturningColumns(returning: ColumnNode[]): string;
6129
- protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
6130
- supportsDmlReturningClause(): boolean;
6131
6264
  }
6132
6265
 
6133
- /**
6134
- * PostgreSQL dialect implementation
6135
- */
6266
+ declare class SqliteUpsertStrategy implements UpsertStrategy {
6267
+ compile(ast: InsertQueryNode, ctx: CompilerContext, services: UpsertCompilationServices): string;
6268
+ }
6269
+
6270
+ declare class SqliteReturningStrategy implements ReturningStrategy {
6271
+ compileReturning(returning: ColumnNode[] | undefined, _ctx: CompilerContext, quoteIdentifier: QuoteIdentifier): string;
6272
+ formatReturningColumns(returning: ColumnNode[], quoteIdentifier: QuoteIdentifier): string;
6273
+ }
6274
+
6275
+ /** PostgreSQL dialect assembled from reusable compiler components. */
6136
6276
  declare class PostgresDialect extends SqlDialectBase implements ProcedureCompiler {
6137
6277
  protected readonly dialect = "postgres";
6138
- /**
6139
- * Creates a new PostgresDialect instance
6140
- */
6278
+ private readonly procedureCompiler;
6141
6279
  constructor();
6142
- /**
6143
- * Quotes an identifier using PostgreSQL double-quote syntax
6144
- * @param id - Identifier to quote
6145
- * @returns Quoted identifier
6146
- */
6147
6280
  quoteIdentifier(id: string): string;
6148
6281
  protected formatPlaceholder(index: number): string;
6149
- /**
6150
- * Compiles JSON path expression using PostgreSQL syntax
6151
- * @param node - JSON path node
6152
- * @returns PostgreSQL JSON path expression
6153
- */
6154
6282
  protected compileJsonPath(node: JsonPathNode): string;
6155
- protected compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext): string;
6156
- protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
6157
- supportsDmlReturningClause(): boolean;
6158
- compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
6159
- /**
6160
- * PostgreSQL requires unqualified column names in SET clause
6161
- */
6283
+ /** PostgreSQL requires unqualified column names in SET clauses. */
6162
6284
  protected compileSetTarget(column: ColumnNode, _table: TableNode): string;
6285
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
6286
+ }
6287
+
6288
+ declare class PostgresUpsertStrategy implements UpsertStrategy {
6289
+ compile(ast: InsertQueryNode, ctx: CompilerContext, services: UpsertCompilationServices): string;
6290
+ }
6291
+
6292
+ /** PostgreSQL uses standard SQL RETURNING with qualified columns. */
6293
+ declare class PostgresReturningStrategy extends StandardReturningStrategy {
6294
+ }
6295
+
6296
+ declare class PostgresProcedureCompiler implements ProcedureCompiler {
6297
+ private readonly services;
6298
+ constructor(services: ProcedureCompilerServices);
6299
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
6163
6300
  }
6164
6301
 
6165
6302
  /** Represents the differences detected in a database column's properties. */
@@ -10465,4 +10602,4 @@ declare class BulkUpsertExecutor extends BulkBaseExecutor<UpsertExecutorOptions>
10465
10602
  }
10466
10603
  declare function bulkUpsert<TTable extends TableDef>(session: OrmSession, table: TTable, rows: InsertRow[], options?: BulkUpsertOptions): Promise<BulkResult>;
10467
10604
 
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 };
10605
+ 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, MssqlDeleteCompiler, MssqlInsertCompiler, type MssqlOutputPrefix, MssqlOutputStrategy, MssqlProcedureCompiler, MssqlSelectCompiler, MssqlUpdateCompiler, MySqlDialect, 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, 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, SqlDialectBase, type SqlDialectBaseOptions, SqlServerDialect, 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, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cosineDistance, cot, count, countAll, createApiComponentsSection, createBetterSqlite3Executor, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlCompilerSet, 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 };