metal-orm 1.1.2 → 1.1.4

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 (42) hide show
  1. package/README.md +728 -707
  2. package/dist/index.cjs +813 -75
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +277 -8
  5. package/dist/index.d.ts +277 -8
  6. package/dist/index.js +812 -75
  7. package/dist/index.js.map +1 -1
  8. package/package.json +8 -2
  9. package/scripts/naming-strategy.mjs +16 -1
  10. package/src/cache/adapters/keyv-cache-adapter.ts +5 -0
  11. package/src/cache/adapters/memory-cache-adapter.ts +5 -0
  12. package/src/cache/adapters/redis-cache-adapter.ts +233 -0
  13. package/src/cache/cache-interfaces.ts +11 -0
  14. package/src/cache/index.ts +2 -0
  15. package/src/core/ast/procedure.ts +21 -0
  16. package/src/core/ast/query.ts +47 -19
  17. package/src/core/ddl/introspect/utils.ts +56 -56
  18. package/src/core/dialect/abstract.ts +560 -547
  19. package/src/core/dialect/base/sql-dialect.ts +43 -29
  20. package/src/core/dialect/mssql/index.ts +369 -232
  21. package/src/core/dialect/mysql/index.ts +99 -7
  22. package/src/core/dialect/postgres/index.ts +121 -60
  23. package/src/core/dialect/sqlite/index.ts +97 -64
  24. package/src/core/execution/db-executor.ts +108 -90
  25. package/src/core/execution/executors/mssql-executor.ts +28 -24
  26. package/src/core/execution/executors/mysql-executor.ts +62 -27
  27. package/src/core/execution/executors/sqlite-executor.ts +10 -9
  28. package/src/index.ts +9 -6
  29. package/src/orm/execute-procedure.ts +77 -0
  30. package/src/orm/execute.ts +74 -73
  31. package/src/orm/interceptor-pipeline.ts +21 -17
  32. package/src/orm/pooled-executor-factory.ts +41 -20
  33. package/src/orm/unit-of-work.ts +6 -4
  34. package/src/query/index.ts +8 -5
  35. package/src/query-builder/delete.ts +3 -2
  36. package/src/query-builder/insert-query-state.ts +47 -19
  37. package/src/query-builder/insert.ts +142 -28
  38. package/src/query-builder/procedure-call.ts +122 -0
  39. package/src/query-builder/select/select-operations.ts +5 -2
  40. package/src/query-builder/select.ts +1146 -1105
  41. package/src/query-builder/update.ts +3 -2
  42. package/src/tree/tree-manager.ts +754 -754
package/dist/index.d.ts CHANGED
@@ -1663,6 +1663,27 @@ interface InsertSelectSourceNode {
1663
1663
  query: SelectQueryNode;
1664
1664
  }
1665
1665
  type InsertSourceNode = InsertValuesSourceNode | InsertSelectSourceNode;
1666
+ interface UpsertConflictTarget {
1667
+ /** Conflict columns (primary key or unique columns) */
1668
+ columns: ColumnNode[];
1669
+ /** Named constraint (PostgreSQL only) */
1670
+ constraint?: string;
1671
+ }
1672
+ interface UpsertUpdateAction {
1673
+ type: 'DoUpdate';
1674
+ /** Assignments to apply on conflict */
1675
+ set: UpdateAssignmentNode[];
1676
+ /** Optional condition for the update branch */
1677
+ where?: ExpressionNode;
1678
+ }
1679
+ interface UpsertDoNothingAction {
1680
+ type: 'DoNothing';
1681
+ }
1682
+ type UpsertAction = UpsertUpdateAction | UpsertDoNothingAction;
1683
+ interface UpsertClause {
1684
+ target: UpsertConflictTarget;
1685
+ action: UpsertAction;
1686
+ }
1666
1687
  interface InsertQueryNode {
1667
1688
  type: 'InsertQuery';
1668
1689
  /** Target table */
@@ -1671,6 +1692,8 @@ interface InsertQueryNode {
1671
1692
  columns: ColumnNode[];
1672
1693
  /** Source of inserted rows (either literal values or a SELECT query) */
1673
1694
  source: InsertSourceNode;
1695
+ /** Optional dialect-specific UPSERT clause */
1696
+ onConflict?: UpsertClause;
1674
1697
  /** Optional RETURNING clause */
1675
1698
  returning?: ColumnNode[];
1676
1699
  }
@@ -1764,6 +1787,23 @@ interface HydrationMetadata {
1764
1787
  [key: string]: unknown;
1765
1788
  }
1766
1789
 
1790
+ type ProcedureDirection = 'in' | 'out' | 'inout';
1791
+ interface ProcedureRefNode {
1792
+ name: string;
1793
+ schema?: string;
1794
+ }
1795
+ interface ProcedureParamNode {
1796
+ name: string;
1797
+ direction: ProcedureDirection;
1798
+ value?: OperandNode;
1799
+ dbType?: string;
1800
+ }
1801
+ interface ProcedureCallNode {
1802
+ type: 'ProcedureCall';
1803
+ ref: ProcedureRefNode;
1804
+ params: ProcedureParamNode[];
1805
+ }
1806
+
1767
1807
  /**
1768
1808
  * Context provided to function renderers.
1769
1809
  */
@@ -1823,6 +1863,12 @@ interface CompiledQuery {
1823
1863
  /** Parameters for the query */
1824
1864
  params: unknown[];
1825
1865
  }
1866
+ interface CompiledProcedureCall extends CompiledQuery {
1867
+ outParams: {
1868
+ source: 'none' | 'firstResultSet' | 'lastResultSet';
1869
+ names: string[];
1870
+ };
1871
+ }
1826
1872
  interface SelectCompiler {
1827
1873
  compileSelect(ast: SelectQueryNode): CompiledQuery;
1828
1874
  }
@@ -1850,6 +1896,7 @@ declare abstract class Dialect implements SelectCompiler, InsertCompiler, Update
1850
1896
  compileInsert(ast: InsertQueryNode): CompiledQuery;
1851
1897
  compileUpdate(ast: UpdateQueryNode): CompiledQuery;
1852
1898
  compileDelete(ast: DeleteQueryNode): CompiledQuery;
1899
+ abstract compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
1853
1900
  supportsDmlReturningClause(): boolean;
1854
1901
  /**
1855
1902
  * Compiles SELECT query AST to SQL (to be implemented by concrete dialects)
@@ -2701,13 +2748,23 @@ type QueryResult = {
2701
2748
  rowsAffected?: number;
2702
2749
  };
2703
2750
  };
2751
+ /**
2752
+ * Canonical execution payload.
2753
+ * It remains array-compatible for a gradual migration but always exposes
2754
+ * `resultSets` for explicit multi-result handling.
2755
+ */
2756
+ type ExecutionPayload = QueryResult[] & {
2757
+ resultSets?: QueryResult[];
2758
+ };
2759
+ declare const toExecutionPayload: (resultSets: QueryResult[]) => ExecutionPayload;
2760
+ declare const payloadResultSets: (payload: ExecutionPayload) => QueryResult[];
2704
2761
  interface DbExecutor {
2705
2762
  /** Capability flags so the runtime can make correct decisions without relying on optional methods. */
2706
2763
  readonly capabilities: {
2707
2764
  /** True if begin/commit/rollback are real and should be used to provide atomicity. */
2708
2765
  transactions: boolean;
2709
2766
  };
2710
- executeSql(sql: string, params?: unknown[]): Promise<QueryResult[]>;
2767
+ executeSql(sql: string, params?: unknown[]): Promise<ExecutionPayload>;
2711
2768
  beginTransaction(): Promise<void>;
2712
2769
  commitTransaction(): Promise<void>;
2713
2770
  rollbackTransaction(): Promise<void>;
@@ -3002,7 +3059,7 @@ interface QueryContext {
3002
3059
  sql: string;
3003
3060
  params: unknown[];
3004
3061
  }
3005
- type QueryInterceptor = (ctx: QueryContext, next: () => Promise<QueryResult[]>) => Promise<QueryResult[]>;
3062
+ type QueryInterceptor = (ctx: QueryContext, next: () => Promise<ExecutionPayload>) => Promise<ExecutionPayload>;
3006
3063
  /**
3007
3064
  * Pipeline for query interceptors.
3008
3065
  * Interceptors can wrap query execution to add logging, tracing, caching, etc.
@@ -3010,7 +3067,7 @@ type QueryInterceptor = (ctx: QueryContext, next: () => Promise<QueryResult[]>)
3010
3067
  declare class InterceptorPipeline {
3011
3068
  private interceptors;
3012
3069
  use(interceptor: QueryInterceptor): void;
3013
- run(ctx: QueryContext, executor: DbExecutor): Promise<QueryResult[]>;
3070
+ run(ctx: QueryContext, executor: DbExecutor): Promise<ExecutionPayload>;
3014
3071
  }
3015
3072
 
3016
3073
  /**
@@ -3038,11 +3095,21 @@ interface CacheInvalidator {
3038
3095
  invalidateTags(tags: string[]): Promise<void>;
3039
3096
  invalidatePrefix(prefix: string): Promise<void>;
3040
3097
  }
3098
+ /**
3099
+ * Capabilities de um cache provider
3100
+ * Permite detectar funcionalidades suportadas em runtime
3101
+ */
3102
+ interface CacheCapabilities {
3103
+ tags: boolean;
3104
+ prefix: boolean;
3105
+ ttl: boolean;
3106
+ }
3041
3107
  /**
3042
3108
  * Interface completa para implementações full-featured
3043
3109
  */
3044
3110
  interface CacheProvider extends CacheReader, CacheWriter, CacheInvalidator {
3045
3111
  readonly name: string;
3112
+ readonly capabilities: CacheCapabilities;
3046
3113
  dispose?(): Promise<void>;
3047
3114
  }
3048
3115
  /**
@@ -3209,6 +3276,11 @@ declare class DefaultCacheStrategy implements CacheStrategy {
3209
3276
  */
3210
3277
  declare class MemoryCacheAdapter implements CacheProvider {
3211
3278
  readonly name = "memory";
3279
+ readonly capabilities: {
3280
+ tags: boolean;
3281
+ prefix: boolean;
3282
+ ttl: boolean;
3283
+ };
3212
3284
  private storage;
3213
3285
  private tagIndex;
3214
3286
  get<T>(key: string): Promise<T | undefined>;
@@ -3255,6 +3327,11 @@ interface KeyvInstance {
3255
3327
  declare class KeyvCacheAdapter implements CacheProvider {
3256
3328
  private keyv;
3257
3329
  readonly name = "keyv";
3330
+ readonly capabilities: {
3331
+ tags: boolean;
3332
+ prefix: boolean;
3333
+ ttl: boolean;
3334
+ };
3258
3335
  constructor(keyv: KeyvInstance);
3259
3336
  get<T>(key: string): Promise<T | undefined>;
3260
3337
  has(key: string): Promise<boolean>;
@@ -3266,6 +3343,93 @@ declare class KeyvCacheAdapter implements CacheProvider {
3266
3343
  dispose(): Promise<void>;
3267
3344
  }
3268
3345
 
3346
+ interface RedisLike {
3347
+ get(key: string): Promise<string | null>;
3348
+ set(key: string, value: string, ...args: (string | number)[]): Promise<string | null>;
3349
+ del(...keys: string[]): Promise<number>;
3350
+ sadd(key: string, ...members: string[]): Promise<number>;
3351
+ smembers(key: string): Promise<string[]>;
3352
+ srem(key: string, ...members: string[]): Promise<number>;
3353
+ scan(cursor: string | number, ...args: (string | number)[]): Promise<[string, string[]]>;
3354
+ quit(): Promise<string>;
3355
+ disconnect(): void;
3356
+ isReady?: boolean;
3357
+ status?: string;
3358
+ }
3359
+ interface RedisOptions {
3360
+ host?: string;
3361
+ port?: number;
3362
+ password?: string;
3363
+ db?: number;
3364
+ keyPrefix?: string;
3365
+ lazyConnect?: boolean;
3366
+ [key: string]: unknown;
3367
+ }
3368
+ /**
3369
+ * Adapter para Redis usando ioredis
3370
+ *
3371
+ * Suporta:
3372
+ * - Tags via Redis Sets (SADD, SMEMBERS, SREM)
3373
+ * - Prefix invalidation via SCAN
3374
+ * - TTL nativo do Redis
3375
+ *
3376
+ * Instalação:
3377
+ * npm install ioredis
3378
+ *
3379
+ * Para testes (dev):
3380
+ * npm install --save-dev ioredis-mock
3381
+ */
3382
+ declare class RedisCacheAdapter implements CacheProvider {
3383
+ readonly name = "redis";
3384
+ readonly capabilities: {
3385
+ tags: boolean;
3386
+ prefix: boolean;
3387
+ ttl: boolean;
3388
+ };
3389
+ private redis;
3390
+ private ownsConnection;
3391
+ private tagPrefix;
3392
+ /**
3393
+ * Cria um adapter Redis
3394
+ *
3395
+ * @param redis - Instância do ioredis OU opções de conexão
3396
+ * @param options - Opções adicionais
3397
+ * @param options.tagPrefix - Prefixo para chaves de tag (default: 'tag:')
3398
+ *
3399
+ * Exemplos:
3400
+ *
3401
+ * // Com instância existente (recomendado para connection pooling):
3402
+ * const redis = new Redis({ host: 'localhost', port: 6379 });
3403
+ * const adapter = new RedisCacheAdapter(redis);
3404
+ *
3405
+ * // Com opções (adapter gerencia conexão):
3406
+ * const adapter = new RedisCacheAdapter({ host: 'localhost', port: 6379 });
3407
+ *
3408
+ * // Para testes com ioredis-mock:
3409
+ * import Redis from 'ioredis-mock';
3410
+ * const adapter = new RedisCacheAdapter(new Redis());
3411
+ */
3412
+ constructor(redis: RedisLike | RedisOptions, options?: {
3413
+ tagPrefix?: string;
3414
+ });
3415
+ private isRedisInstance;
3416
+ private createRedis;
3417
+ get<T>(key: string): Promise<T | undefined>;
3418
+ has(key: string): Promise<boolean>;
3419
+ set<T>(key: string, value: T, ttlMs?: number, tags?: string[]): Promise<void>;
3420
+ delete(key: string): Promise<void>;
3421
+ invalidate(key: string): Promise<void>;
3422
+ invalidateTags(tags: string[]): Promise<void>;
3423
+ invalidatePrefix(prefix: string): Promise<void>;
3424
+ private registerTags;
3425
+ dispose(): Promise<void>;
3426
+ /**
3427
+ * Retorna a instância Redis subjacente
3428
+ * Útil para operações avançadas ou health checks
3429
+ */
3430
+ getRedis(): RedisLike;
3431
+ }
3432
+
3269
3433
  /**
3270
3434
  * Indexa chaves por tags para invalidação em massa
3271
3435
  * Implementação em memória (pode ser persistida no Redis)
@@ -4680,6 +4844,33 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4680
4844
  * // rows is EntityInstance<UserTable>[] (plain objects)
4681
4845
  * rows[0] instanceof User; // false
4682
4846
  */
4847
+ /**
4848
+ * Executes the query with LIMIT 1 and returns the first result.
4849
+ * Throws if no record is found.
4850
+ *
4851
+ * @param ctx - ORM session context
4852
+ * @returns Promise of a single entity instance
4853
+ * @throws Error if no results are found
4854
+ * @example
4855
+ * const user = await selectFromEntity(User)
4856
+ * .where(eq(users.email, 'alice@example.com'))
4857
+ * .firstOrFail(session);
4858
+ */
4859
+ firstOrFail(ctx: OrmSession): Promise<T>;
4860
+ /**
4861
+ * Executes the query with LIMIT 1 and returns the first result as a plain object (POJO).
4862
+ * Throws if no record is found.
4863
+ *
4864
+ * @param ctx - ORM session context
4865
+ * @returns Promise of a single plain object
4866
+ * @throws Error if no results are found
4867
+ * @example
4868
+ * const user = await selectFromEntity(User)
4869
+ * .where(eq(users.email, 'alice@example.com'))
4870
+ * .firstOrFailPlain(session);
4871
+ * // user is a plain object, not an instance of User
4872
+ */
4873
+ firstOrFailPlain(ctx: OrmSession): Promise<T>;
4683
4874
  executePlain(ctx: OrmSession): Promise<T[]>;
4684
4875
  /**
4685
4876
  * Executes the query and returns results as real class instances.
@@ -5020,9 +5211,39 @@ declare class InsertQueryState {
5020
5211
  * @returns A new InsertQueryState with the RETURNING clause added
5021
5212
  */
5022
5213
  withReturning(columns: ColumnNode[]): InsertQueryState;
5214
+ /**
5215
+ * Adds an UPSERT conflict clause to the INSERT query
5216
+ * @param clause - Conflict clause and action
5217
+ * @returns A new InsertQueryState with conflict handling configured
5218
+ */
5219
+ withOnConflict(clause: UpsertClause): InsertQueryState;
5023
5220
  }
5024
5221
 
5025
5222
  type InsertDialectInput = Dialect | DialectKey;
5223
+ /**
5224
+ * Builder returned by InsertQueryBuilder.onConflict()
5225
+ */
5226
+ declare class ConflictBuilder<T> {
5227
+ private readonly table;
5228
+ private readonly columns;
5229
+ private readonly constraint?;
5230
+ private readonly applyClause;
5231
+ constructor(table: TableDef, columns: ColumnNode[], constraint: string | undefined, applyClause: (clause: UpsertClause) => InsertQueryBuilder<T>);
5232
+ /**
5233
+ * Adds ON CONFLICT ... DO UPDATE
5234
+ * @param set - Column assignments for update branch
5235
+ * @param where - Optional filter for update branch
5236
+ * @returns InsertQueryBuilder with the upsert clause configured
5237
+ */
5238
+ doUpdate(set: Record<string, ValueOperandInput>, where?: ExpressionNode): InsertQueryBuilder<T>;
5239
+ /**
5240
+ * Adds ON CONFLICT ... DO NOTHING
5241
+ * @returns InsertQueryBuilder with the upsert clause configured
5242
+ */
5243
+ doNothing(): InsertQueryBuilder<T>;
5244
+ private buildTarget;
5245
+ private buildAssignments;
5246
+ }
5026
5247
  /**
5027
5248
  * Builder for INSERT queries
5028
5249
  */
@@ -5036,6 +5257,7 @@ declare class InsertQueryBuilder<T> {
5036
5257
  */
5037
5258
  constructor(table: TableDef, state?: InsertQueryState);
5038
5259
  private clone;
5260
+ private withOnConflict;
5039
5261
  /**
5040
5262
  * Adds VALUES to the INSERT query
5041
5263
  * @param rowOrRows - Single row object or array of row objects to insert
@@ -5056,6 +5278,13 @@ declare class InsertQueryBuilder<T> {
5056
5278
  * @returns A new InsertQueryBuilder with the SELECT source
5057
5279
  */
5058
5280
  fromSelect<TSource extends TableDef>(query: SelectQueryNode | SelectQueryBuilder<unknown, TSource>, columns?: (ColumnDef | ColumnNode)[]): InsertQueryBuilder<T>;
5281
+ /**
5282
+ * Configures UPSERT conflict handling for INSERT.
5283
+ * @param columns - Conflict target columns (ignored by MySQL)
5284
+ * @param constraint - Named unique/primary constraint (PostgreSQL only)
5285
+ * @returns ConflictBuilder for selecting action (DO UPDATE / DO NOTHING)
5286
+ */
5287
+ onConflict(columns?: (ColumnDef | ColumnNode)[], constraint?: string): ConflictBuilder<T>;
5059
5288
  /**
5060
5289
  * Adds a RETURNING clause to the INSERT query
5061
5290
  * @param columns - Columns to return after insertion
@@ -5344,6 +5573,34 @@ declare class DeleteQueryBuilder<T> {
5344
5573
  getAST(): DeleteQueryNode;
5345
5574
  }
5346
5575
 
5576
+ interface ProcedureExecutionResult {
5577
+ resultSets: QueryResult[];
5578
+ out: Record<string, unknown>;
5579
+ }
5580
+ declare const executeProcedureAst: (session: OrmSession, ast: ProcedureCallNode) => Promise<ProcedureExecutionResult>;
5581
+
5582
+ type ProcedureDialectInput = Dialect | DialectKey;
5583
+ interface CallProcedureOptions {
5584
+ schema?: string;
5585
+ }
5586
+ interface ProcedureOutOptions {
5587
+ dbType?: string;
5588
+ }
5589
+ declare class ProcedureCallBuilder {
5590
+ private readonly ast;
5591
+ constructor(name: string, options?: CallProcedureOptions, ast?: ProcedureCallNode);
5592
+ private clone;
5593
+ in(name: string, value: ValueOperandInput): ProcedureCallBuilder;
5594
+ out(name: string, options?: ProcedureOutOptions): ProcedureCallBuilder;
5595
+ inOut(name: string, value: ValueOperandInput, options?: ProcedureOutOptions): ProcedureCallBuilder;
5596
+ compile(dialect: ProcedureDialectInput): CompiledProcedureCall;
5597
+ toSql(dialect: ProcedureDialectInput): string;
5598
+ getAST(): ProcedureCallNode;
5599
+ execute(session: OrmSession): Promise<ProcedureExecutionResult>;
5600
+ private validateMssqlOutDbType;
5601
+ }
5602
+ declare const callProcedure: (name: string, options?: CallProcedureOptions) => ProcedureCallBuilder;
5603
+
5347
5604
  /**
5348
5605
  * Represents a target for query operations, which can be either a table definition
5349
5606
  * or an entity constructor. This type allows flexible targeting of database tables
@@ -5454,9 +5711,11 @@ declare abstract class SqlDialectBase extends Dialect {
5454
5711
  protected compileSelectAst(ast: SelectQueryNode, ctx: CompilerContext): string;
5455
5712
  private compileSelectWithSetOps;
5456
5713
  protected compileInsertAst(ast: InsertQueryNode, ctx: CompilerContext): string;
5714
+ protected compileUpsertClause(ast: InsertQueryNode, _ctx: CompilerContext): string;
5457
5715
  protected compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext): string;
5458
- private compileInsertSource;
5459
- private compileInsertColumnList;
5716
+ protected compileInsertSource(source: InsertSourceNode, ctx: CompilerContext): string;
5717
+ protected compileInsertColumnList(columns: ColumnNode[]): string;
5718
+ protected ensureConflictColumns(clause: UpsertClause, message: string): void;
5460
5719
  private compileSelectCore;
5461
5720
  protected compileUpdateAst(ast: UpdateQueryNode, ctx: CompilerContext): string;
5462
5721
  protected compileUpdateAssignments(assignments: {
@@ -5513,6 +5772,8 @@ declare class MySqlDialect extends SqlDialectBase {
5513
5772
  * @returns MySQL JSON path expression
5514
5773
  */
5515
5774
  protected compileJsonPath(node: JsonPathNode): string;
5775
+ protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
5776
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
5516
5777
  }
5517
5778
 
5518
5779
  /**
@@ -5558,8 +5819,11 @@ declare class SqlServerDialect extends SqlDialectBase {
5558
5819
  protected compileReturning(returning: ColumnNode[] | undefined, _ctx: CompilerContext): string;
5559
5820
  private compileOutputClause;
5560
5821
  protected compileInsertAst(ast: InsertQueryNode, ctx: CompilerContext): string;
5822
+ private compileMergeInsert;
5823
+ private compileMergeUsingSource;
5561
5824
  private compileInsertValues;
5562
5825
  private compileCtes;
5826
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
5563
5827
  }
5564
5828
 
5565
5829
  /**
@@ -5586,7 +5850,9 @@ declare class SqliteDialect extends SqlDialectBase {
5586
5850
  protected compileQualifiedColumn(column: ColumnNode, _table: TableNode): string;
5587
5851
  protected compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext): string;
5588
5852
  protected formatReturningColumns(returning: ColumnNode[]): string;
5853
+ protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
5589
5854
  supportsDmlReturningClause(): boolean;
5855
+ compileProcedureCall(_ast: ProcedureCallNode): CompiledProcedureCall;
5590
5856
  }
5591
5857
 
5592
5858
  /**
@@ -5612,7 +5878,9 @@ declare class PostgresDialect extends SqlDialectBase {
5612
5878
  */
5613
5879
  protected compileJsonPath(node: JsonPathNode): string;
5614
5880
  protected compileReturning(returning: ColumnNode[] | undefined, ctx: CompilerContext): string;
5881
+ protected compileUpsertClause(ast: InsertQueryNode, ctx: CompilerContext): string;
5615
5882
  supportsDmlReturningClause(): boolean;
5883
+ compileProcedureCall(ast: ProcedureCallNode): CompiledProcedureCall;
5616
5884
  /**
5617
5885
  * PostgreSQL requires unqualified column names in SET clause
5618
5886
  */
@@ -7709,7 +7977,8 @@ declare function createSqliteExecutor(client: SqliteClientLike): DbExecutor;
7709
7977
 
7710
7978
  interface MssqlClientLike {
7711
7979
  query(sql: string, params?: unknown[]): Promise<{
7712
- recordset: Array<Record<string, unknown>>;
7980
+ recordset?: Array<Record<string, unknown>>;
7981
+ recordsets?: Array<Array<Record<string, unknown>>>;
7713
7982
  }>;
7714
7983
  beginTransaction?(): Promise<void>;
7715
7984
  commit?(): Promise<void>;
@@ -7760,7 +8029,7 @@ declare function createTediousMssqlClient(connection: TediousConnectionLike, { R
7760
8029
  declare function createTediousExecutor(connection: TediousConnectionLike, module: TediousModule, options?: CreateTediousClientOptions): DbExecutor;
7761
8030
 
7762
8031
  interface PooledConnectionAdapter<TConn> {
7763
- query(conn: TConn, sql: string, params?: unknown[]): Promise<Array<Record<string, unknown>>>;
8032
+ query(conn: TConn, sql: string, params?: unknown[]): Promise<Array<Record<string, unknown>> | Array<Array<Record<string, unknown>>> | QueryResult[]>;
7764
8033
  beginTransaction(conn: TConn): Promise<void>;
7765
8034
  commitTransaction(conn: TConn): Promise<void>;
7766
8035
  rollbackTransaction(conn: TConn): Promise<void>;
@@ -9531,4 +9800,4 @@ declare function setTreeBounds(entity: object, config: TreeConfig, lft: number,
9531
9800
  */
9532
9801
  declare function setTreeParentId(entity: object, config: TreeConfig, parentId: unknown): void;
9533
9802
 
9534
- export { type AliasRefNode, Alphanumeric, type AnyDomainEvent, type ApiRouteDefinition, type ApplyFilterOptions, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, type AutoCorrectionResult, type AutoTransformResult, type AutoTransformableValidator, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, CEP, CNPJ, CPF, type CacheInvalidator, type CacheOptions, type CacheProvider, type CacheReader, type CacheState, type CacheStrategy, type CacheWriter, Capitalize, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnToTs, type ColumnType, type ComponentOptions, type ComponentReference, type CompositeTransformer, ConstructorMaterializationStrategy, type ValidationResult as CountryValidationResult, type CountryValidator, type CountryValidatorFactory, type CreateDto, type CreateTediousClientOptions, DEFAULT_TREE_CONFIG, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DatabaseView, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultCacheStrategy, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, type Duration, Email, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecuteFilteredPagedOptions, type ExecutionContext, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, type FieldFilter, type FilterOperator, type FilterValue, type FindChildrenOptions, type FindPathOptions, type ForeignKeyReference, type FunctionNode, type GroupConcatOptions, type HasDomainEvents, HasMany, type HasManyCollection, type HasManyOptions, type HasManyRelation, HasOne, type HasOneOptions, type HasOneReference, type HasOneReferenceApi, type HasOneRelation, type HydrationContext, type HydrationMetadata, type HydrationPivotPlan, type HydrationPlan, type HydrationRelationPlan, type InExpressionNode, type InExpressionRight, type IndexColumn, type IndexDef, type InferRow, type InitialHandlers, InsertQueryBuilder, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDialect, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiDocumentOptions, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterObject, type OpenApiResponseObject, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmCacheOptions, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, type PropertySanitizer, type PropertyTransformer, type PropertyValidator, PrototypeMaterializationStrategy, QueryCacheManager, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type RecoverResult, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, type RelationFilter, type RelationKey$1 as RelationKey, RelationKinds, type RelationMap, type RelationTargetTable, type RelationType, type RenderColumnOptions, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, TagIndex, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type ThreadedNode, Title, type ToJsonOptions, type TrackedEntity, type TransformContext, type TransformerConfig, type TransformerMetadata, Tree, TreeChildren, type TreeColumns, type TreeConfig, type TreeDecoratorOptions, type TreeInsertData, type TreeListEntry, type TreeListOptions, type TreeListSchemaOptions, TreeManager, type TreeManagerOptions, type TreeMetadata, type TreeMoveData, type TreeNode, type TreeNodeResult, type TreeNodeResultSchemaOptions, type TreeNodeSchemaOptions, TreeParent, type TreeQuery, type TreeScope, type TreeValidationResult, Trim, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, age, aliasRef, and, applyFilter, applyNullability, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, buildScopeConditions, calculateRowDepths, calculateTotalPages, canonicalizeSchema, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToFilterSchema, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, createTreeManager, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeFilteredPaged, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, extractScopeValues, firstValue, floor, formatDuration, formatTreeList, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, generateTreeComponents, getColumn, getColumnMap, getColumnType, getDateKind, getDecoratorMetadata, getDeterministicComponentName, getOpenApiVersionForDialect, getRegisteredValidators, getSchemaIntrospector, getTableDefFromEntity, getTreeBounds, getTreeColumns, getTreeConfig, getTreeMetadata, getTreeParentId, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hasTreeBehavior, hasValidator, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isNullableColumn, isOperandNode, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pagedResponseToOpenApiSchema, paginationParamsSchema, parameterToRef, parseDuration, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, registerValidator, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, resolveTreeConfig, resolveValidator, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, setTreeBounds, setTreeMetadata, setTreeParentId, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, threadResults, threadedNodeToOpenApiSchema, toColumnRef, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, treeEntityRegistry, treeListEntryToOpenApiSchema, treeNodeResultToOpenApiSchema, treeNodeToOpenApiSchema, treeQuery, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, validateTreeTable, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
9803
+ export { type AliasRefNode, Alphanumeric, type AnyDomainEvent, type ApiRouteDefinition, type ApplyFilterOptions, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, type AutoCorrectionResult, type AutoTransformResult, type AutoTransformableValidator, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, BinaryTypeStrategy, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, CEP, CNPJ, CPF, type CacheCapabilities, type CacheInvalidator, type CacheOptions, type CacheProvider, type CacheReader, type CacheState, type CacheStrategy, type CacheWriter, type CallProcedureOptions, Capitalize, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnToTs, type ColumnType, type ComponentOptions, type ComponentReference, type CompositeTransformer, ConflictBuilder, ConstructorMaterializationStrategy, type ValidationResult as CountryValidationResult, type CountryValidator, type CountryValidatorFactory, type CreateDto, type CreateTediousClientOptions, DEFAULT_TREE_CONFIG, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DatabaseView, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultCacheStrategy, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, type Duration, Email, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecuteFilteredPagedOptions, type ExecutionContext, type ExecutionPayload, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, type FieldFilter, type FilterOperator, type FilterValue, type FindChildrenOptions, type FindPathOptions, type ForeignKeyReference, type FunctionNode, type GroupConcatOptions, type HasDomainEvents, HasMany, type HasManyCollection, type HasManyOptions, type HasManyRelation, HasOne, type HasOneOptions, type HasOneReference, type HasOneReferenceApi, type HasOneRelation, type HydrationContext, type HydrationMetadata, type HydrationPivotPlan, type HydrationPlan, type HydrationRelationPlan, type InExpressionNode, type InExpressionRight, type IndexColumn, type IndexDef, type InferRow, type InitialHandlers, InsertQueryBuilder, IntegerTypeStrategy, InterceptorPipeline, type IntrospectOptions, type InvalidationStrategy, type JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, KeyvCacheAdapter, Length, type LiteralNode, type LiteralValue, type LogicalExpressionNode, Lower, type ManyToManyCollection, MemoryCacheAdapter, type MoveOptions, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NestedSetBounds, type NestedSetRow, NestedSetStrategy, type NodeWithPk, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDialect, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiDocumentOptions, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterObject, type OpenApiResponseObject, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmCacheOptions, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, type PatchGraphInputPayload, Pattern, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, ProcedureCallBuilder, type ProcedureCallNode, type ProcedureDirection, type ProcedureExecutionResult, type ProcedureOutOptions, type ProcedureParamNode, type ProcedureRefNode, type PropertySanitizer, type PropertyTransformer, type PropertyValidator, PrototypeMaterializationStrategy, QueryCacheManager, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type RecoverResult, RedisCacheAdapter, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, type RelationFilter, type RelationKey$1 as RelationKey, RelationKinds, type RelationMap, type RelationTargetTable, type RelationType, type RenderColumnOptions, STANDARD_COLUMN_TYPES, type SaveGraphInputPayload, type SaveGraphInputScalar, type SaveGraphJsonScalar, type SaveGraphSessionOptions, type ScalarSubqueryNode, type SchemaChange, type SchemaChangeKind, type SchemaDiffOptions, type SchemaGenerateResult, type SchemaIntrospector, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, type SimpleWhereInput, type Simplify, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type StringFilter, StringTypeStrategy, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, TagIndex, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type ThreadedNode, Title, type ToJsonOptions, type TrackedEntity, type TransformContext, type TransformerConfig, type TransformerMetadata, Tree, TreeChildren, type TreeColumns, type TreeConfig, type TreeDecoratorOptions, type TreeInsertData, type TreeListEntry, type TreeListOptions, type TreeListSchemaOptions, TreeManager, type TreeManagerOptions, type TreeMetadata, type TreeMoveData, type TreeNode, type TreeNodeResult, type TreeNodeResultSchemaOptions, type TreeNodeSchemaOptions, TreeParent, type TreeQuery, type TreeScope, type TreeValidationResult, Trim, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, Upper, UuidTypeStrategy, type ValidationOptions, type ValidationResult$1 as ValidationResult, type ValidatorFactoryOptions, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, age, aliasRef, and, applyFilter, applyNullability, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, buildScopeConditions, calculateRowDepths, calculateTotalPages, callProcedure, canonicalizeSchema, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToFilterSchema, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, computeSchemaHash, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDeterministicNamingState, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, createTreeManager, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeFilteredPaged, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeProcedureAst, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, extractScopeValues, firstValue, floor, formatDuration, formatTreeList, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, generateTreeComponents, getColumn, getColumnMap, getColumnType, getDateKind, getDecoratorMetadata, getDeterministicComponentName, getOpenApiVersionForDialect, getRegisteredValidators, getSchemaIntrospector, getTableDefFromEntity, getTreeBounds, getTreeColumns, getTreeConfig, getTreeMetadata, getTreeParentId, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hasTreeBehavior, hasValidator, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isNullableColumn, isOperandNode, isTableDef, isTreeConfig, isValidDuration, isValueOperandInput, isWindowFunctionNode, jsonArrayAgg, jsonContains, jsonLength, jsonPath, jsonSet, jsonify, lag, lastValue, lead, least, left, length, like, ln, loadBelongsToManyRelation, loadBelongsToRelation, loadHasManyRelation, loadHasOneRelation, localTime, localTimestamp, locate, log, log10, log2, logBase, lower, lpad, lt, lte, ltrim, mapFields, materializeAs, max, md5, mergeSchemas, min, minute, mod, month, mul, neq, nestedDtoToOpenApiSchema, nestedWhereInputToOpenApiSchema, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pagedResponseToOpenApiSchema, paginationParamsSchema, parameterToRef, parseDuration, payloadResultSets, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, registerValidator, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, resolveTreeConfig, resolveValidator, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, setTreeBounds, setTreeMetadata, setTreeParentId, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, threadResults, threadedNodeToOpenApiSchema, toColumnRef, toExecutionPayload, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, treeEntityRegistry, treeListEntryToOpenApiSchema, treeNodeResultToOpenApiSchema, treeNodeToOpenApiSchema, treeQuery, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, validateTreeTable, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };