metal-orm 1.0.85 → 1.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1446,6 +1446,8 @@ interface ExpressionVisitor<R> {
1446
1446
  visitBetweenExpression?(node: BetweenExpressionNode): R;
1447
1447
  visitArithmeticExpression?(node: ArithmeticExpressionNode): R;
1448
1448
  visitBitwiseExpression?(node: BitwiseExpressionNode): R;
1449
+ visitOperand?(node: OperandNode): R;
1450
+ visitSelectQuery?(node: SelectQueryNode): R;
1449
1451
  otherwise?(node: ExpressionNode): R;
1450
1452
  }
1451
1453
  /**
@@ -1461,6 +1463,10 @@ interface OperandVisitor<R> {
1461
1463
  visitCaseExpression?(node: CaseExpressionNode): R;
1462
1464
  visitCast?(node: CastExpressionNode): R;
1463
1465
  visitWindowFunction?(node: WindowFunctionNode): R;
1466
+ visitArithmeticExpression?(node: ArithmeticExpressionNode): R;
1467
+ visitBitwiseExpression?(node: BitwiseExpressionNode): R;
1468
+ visitExpression?(node: ExpressionNode): R;
1469
+ visitSelectQuery?(node: SelectQueryNode): R;
1464
1470
  visitCollate?(node: CollateExpressionNode): R;
1465
1471
  visitAliasRef?(node: AliasRefNode): R;
1466
1472
  otherwise?(node: OperandNode): R;
@@ -1477,6 +1483,8 @@ declare const registerExpressionDispatcher: (type: string, dispatcher: Expressio
1477
1483
  * Allows new node kinds without modifying the core switch.
1478
1484
  */
1479
1485
  declare const registerOperandDispatcher: (type: string, dispatcher: OperandDispatch) => void;
1486
+ declare const hasExpressionDispatcher: (type: string) => boolean;
1487
+ declare const hasOperandDispatcher: (type: string) => boolean;
1480
1488
  /**
1481
1489
  * Clears all registered dispatchers. Primarily for tests.
1482
1490
  */
@@ -3972,6 +3980,9 @@ type SelectionValueType<TValue> = TValue extends TypedExpression<infer TRuntime>
3972
3980
  type SelectionResult<TSelection extends Record<string, ColumnSelectionValue>> = {
3973
3981
  [K in keyof TSelection]: SelectionValueType<TSelection[K]>;
3974
3982
  };
3983
+ type ParamOperandOptions$1 = {
3984
+ allowParamOperands?: boolean;
3985
+ };
3975
3986
  type SelectionFromKeys<TTable extends TableDef, K extends keyof TTable['columns'] & string> = Pick<InferRow<TTable>, K>;
3976
3987
  type DeepSelectEntry<TTable extends TableDef> = {
3977
3988
  type: 'root';
@@ -4338,7 +4349,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4338
4349
  * // users is User[]
4339
4350
  * users[0] instanceof User; // true
4340
4351
  */
4341
- execute(ctx: OrmSession): Promise<T[]>;
4352
+ execute(ctx: OrmSession, options?: ParamOperandOptions$1): Promise<T[]>;
4342
4353
  /**
4343
4354
  * Executes the query and returns plain row objects (POJOs), ignoring any entity materialization.
4344
4355
  * Use this if you want raw data even when using selectFromEntity.
@@ -4350,7 +4361,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4350
4361
  * // rows is EntityInstance<UserTable>[] (plain objects)
4351
4362
  * rows[0] instanceof User; // false
4352
4363
  */
4353
- executePlain(ctx: OrmSession): Promise<EntityInstance<TTable>[]>;
4364
+ executePlain(ctx: OrmSession, options?: ParamOperandOptions$1): Promise<EntityInstance<TTable>[]>;
4354
4365
  /**
4355
4366
  * Executes the query and returns results as real class instances.
4356
4367
  * Unlike execute(), this returns actual instances of the decorated entity class
@@ -4365,14 +4376,14 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4365
4376
  * users[0] instanceof User; // true!
4366
4377
  * users[0].getFullName(); // works!
4367
4378
  */
4368
- executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession): Promise<TEntity[]>;
4379
+ executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession, options?: ParamOperandOptions$1): Promise<TEntity[]>;
4369
4380
  /**
4370
4381
  * Executes a count query for the current builder without LIMIT/OFFSET clauses.
4371
4382
  *
4372
4383
  * @example
4373
4384
  * const total = await qb.count(session);
4374
4385
  */
4375
- count(session: OrmSession): Promise<number>;
4386
+ count(session: OrmSession, options?: ParamOperandOptions$1): Promise<number>;
4376
4387
  /**
4377
4388
  * Executes the query and returns both the paged items and the total.
4378
4389
  *
@@ -4382,7 +4393,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4382
4393
  executePaged(session: OrmSession, options: {
4383
4394
  page: number;
4384
4395
  pageSize: number;
4385
- }): Promise<PaginatedResult<T>>;
4396
+ } & ParamOperandOptions$1): Promise<PaginatedResult<T>>;
4386
4397
  /**
4387
4398
  * Executes the query with provided execution and hydration contexts
4388
4399
  * @param execCtx - Execution context
@@ -4393,7 +4404,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4393
4404
  * const hydCtx = new HydrationContext();
4394
4405
  * const users = await qb.executeWithContexts(execCtx, hydCtx);
4395
4406
  */
4396
- executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext): Promise<T[]>;
4407
+ executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext, options?: ParamOperandOptions$1): Promise<T[]>;
4397
4408
  /**
4398
4409
  * Adds a WHERE condition to the query
4399
4410
  * @param expr - Expression for the WHERE clause
@@ -4565,7 +4576,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4565
4576
  * .compile('postgres');
4566
4577
  * console.log(compiled.sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
4567
4578
  */
4568
- compile(dialect: SelectDialectInput): CompiledQuery;
4579
+ compile(dialect: SelectDialectInput, options?: ParamOperandOptions$1): CompiledQuery;
4569
4580
  /**
4570
4581
  * Converts the query to SQL string for a specific dialect
4571
4582
  * @param dialect - Database dialect to generate SQL for
@@ -4576,7 +4587,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4576
4587
  * .toSql('postgres');
4577
4588
  * console.log(sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
4578
4589
  */
4579
- toSql(dialect: SelectDialectInput): string;
4590
+ toSql(dialect: SelectDialectInput, options?: ParamOperandOptions$1): string;
4580
4591
  /**
4581
4592
  * Gets hydration plan for query
4582
4593
  * @returns Hydration plan or undefined if none exists
@@ -6756,6 +6767,9 @@ declare class DefaultManyToManyCollection<TTarget, TPivot extends object | undef
6756
6767
  toJSON(): TTarget[];
6757
6768
  }
6758
6769
 
6770
+ type ParamOperandOptions = {
6771
+ allowParamOperands?: boolean;
6772
+ };
6759
6773
  /**
6760
6774
  * Executes a hydrated query using the ORM session.
6761
6775
  * @template TTable - The table type
@@ -6763,7 +6777,7 @@ declare class DefaultManyToManyCollection<TTarget, TPivot extends object | undef
6763
6777
  * @param qb - The select query builder
6764
6778
  * @returns Promise resolving to array of entity instances
6765
6779
  */
6766
- declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
6780
+ declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<EntityInstance<TTable>[]>;
6767
6781
  /**
6768
6782
  * Executes a hydrated query and returns plain row objects (no entity proxies).
6769
6783
  * @template TTable - The table type
@@ -6771,7 +6785,7 @@ declare function executeHydrated<TTable extends TableDef>(session: OrmSession, q
6771
6785
  * @param qb - The select query builder
6772
6786
  * @returns Promise resolving to array of plain row objects
6773
6787
  */
6774
- declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
6788
+ declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<Record<string, unknown>[]>;
6775
6789
  /**
6776
6790
  * Executes a hydrated query using execution and hydration contexts.
6777
6791
  * @template TTable - The table type
@@ -6780,7 +6794,7 @@ declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSessi
6780
6794
  * @param qb - The select query builder
6781
6795
  * @returns Promise resolving to array of entity instances
6782
6796
  */
6783
- declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
6797
+ declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<EntityInstance<TTable>[]>;
6784
6798
  /**
6785
6799
  * Executes a hydrated query using execution context and returns plain row objects.
6786
6800
  * @template TTable - The table type
@@ -6788,7 +6802,7 @@ declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: E
6788
6802
  * @param qb - The select query builder
6789
6803
  * @returns Promise resolving to array of plain row objects
6790
6804
  */
6791
- declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
6805
+ declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<Record<string, unknown>[]>;
6792
6806
 
6793
6807
  type JsonifyScalar<T> = T extends Date ? string : T;
6794
6808
  /**
@@ -7220,4 +7234,4 @@ type PooledExecutorFactoryOptions<TConn> = {
7220
7234
  */
7221
7235
  declare function createPooledExecutorFactory<TConn>(opts: PooledExecutorFactoryOptions<TConn>): DbExecutorFactory;
7222
7236
 
7223
- export { type AliasRefNode, type AnyDomainEvent, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, type BinaryExpressionNode, type BitwiseExpressionNode, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnSchemaOptions, type ColumnToTs, type ColumnType, ConstructorMaterializationStrategy, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DbExecutor, type DbExecutorFactory, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecutionContext, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, 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 InputRelationMode, type InputSchemaMode, type InputSchemaOptions, InsertQueryBuilder, InterceptorPipeline, type IntrospectOptions, type JsonPathNode, type JsonSchemaFormat, type JsonSchemaProperty, type JsonSchemaType, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NullExpressionNode, type OpenApiParameter, type OpenApiSchema, type OpenApiSchemaBundle, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type OutputSchemaOptions, type PaginatedResult, type ParamNode, type ParamProxy, type ParamProxyRoot, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, PrototypeMaterializationStrategy, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, 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 SchemaExtractionContext, type SchemaGenerateResult, type SchemaIntrospector, type SchemaOptions, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeScriptGenerator, type TypedExpression, type TypedLike, UpdateQueryBuilder, type ValueOperandInput, type WindowFunctionNode, abs, acos, add, addDomainEvent, age, aliasRef, and, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterParameters, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, concat, concatWs, correlateBy, cos, cot, count, countAll, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createParamProxy, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, endOfMonth, entityRef, entityRefs, eq, esel, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractSchema, firstValue, floor, fromUnixTime, generateCreateTableSql, generateSchemaSql, generateSchemaSqlFor, getColumn, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, getTemporalFormat, greatest, groupConcat, gt, gte, hasMany, hasOne, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, 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, mapColumnType, mapRelationType, materializeAs, max, md5, min, minute, mod, month, mul, neq, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pi, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toTableRef, trim, trunc, truncate, unixTimestamp, update, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, windowFunction, year };
7237
+ export { type AliasRefNode, type AnyDomainEvent, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, type BinaryExpressionNode, type BitwiseExpressionNode, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnSchemaOptions, type ColumnToTs, type ColumnType, ConstructorMaterializationStrategy, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DbExecutor, type DbExecutorFactory, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecutionContext, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, 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 InputRelationMode, type InputSchemaMode, type InputSchemaOptions, InsertQueryBuilder, InterceptorPipeline, type IntrospectOptions, type JsonPathNode, type JsonSchemaFormat, type JsonSchemaProperty, type JsonSchemaType, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NullExpressionNode, type OpenApiParameter, type OpenApiSchema, type OpenApiSchemaBundle, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type OutputSchemaOptions, type PaginatedResult, type ParamNode, type ParamProxy, type ParamProxyRoot, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, PrototypeMaterializationStrategy, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, 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 SchemaExtractionContext, type SchemaGenerateResult, type SchemaIntrospector, type SchemaOptions, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeScriptGenerator, type TypedExpression, type TypedLike, UpdateQueryBuilder, type ValueOperandInput, type WindowFunctionNode, abs, acos, add, addDomainEvent, age, aliasRef, and, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterParameters, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, concat, concatWs, correlateBy, cos, cot, count, countAll, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createParamProxy, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, endOfMonth, entityRef, entityRefs, eq, esel, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractSchema, firstValue, floor, fromUnixTime, generateCreateTableSql, generateSchemaSql, generateSchemaSqlFor, getColumn, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, getTemporalFormat, greatest, groupConcat, gt, gte, hasExpressionDispatcher, hasMany, hasOne, hasOperandDispatcher, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, 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, mapColumnType, mapRelationType, materializeAs, max, md5, min, minute, mod, month, mul, neq, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pi, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toTableRef, trim, trunc, truncate, unixTimestamp, update, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, windowFunction, year };
package/dist/index.d.ts CHANGED
@@ -1446,6 +1446,8 @@ interface ExpressionVisitor<R> {
1446
1446
  visitBetweenExpression?(node: BetweenExpressionNode): R;
1447
1447
  visitArithmeticExpression?(node: ArithmeticExpressionNode): R;
1448
1448
  visitBitwiseExpression?(node: BitwiseExpressionNode): R;
1449
+ visitOperand?(node: OperandNode): R;
1450
+ visitSelectQuery?(node: SelectQueryNode): R;
1449
1451
  otherwise?(node: ExpressionNode): R;
1450
1452
  }
1451
1453
  /**
@@ -1461,6 +1463,10 @@ interface OperandVisitor<R> {
1461
1463
  visitCaseExpression?(node: CaseExpressionNode): R;
1462
1464
  visitCast?(node: CastExpressionNode): R;
1463
1465
  visitWindowFunction?(node: WindowFunctionNode): R;
1466
+ visitArithmeticExpression?(node: ArithmeticExpressionNode): R;
1467
+ visitBitwiseExpression?(node: BitwiseExpressionNode): R;
1468
+ visitExpression?(node: ExpressionNode): R;
1469
+ visitSelectQuery?(node: SelectQueryNode): R;
1464
1470
  visitCollate?(node: CollateExpressionNode): R;
1465
1471
  visitAliasRef?(node: AliasRefNode): R;
1466
1472
  otherwise?(node: OperandNode): R;
@@ -1477,6 +1483,8 @@ declare const registerExpressionDispatcher: (type: string, dispatcher: Expressio
1477
1483
  * Allows new node kinds without modifying the core switch.
1478
1484
  */
1479
1485
  declare const registerOperandDispatcher: (type: string, dispatcher: OperandDispatch) => void;
1486
+ declare const hasExpressionDispatcher: (type: string) => boolean;
1487
+ declare const hasOperandDispatcher: (type: string) => boolean;
1480
1488
  /**
1481
1489
  * Clears all registered dispatchers. Primarily for tests.
1482
1490
  */
@@ -3972,6 +3980,9 @@ type SelectionValueType<TValue> = TValue extends TypedExpression<infer TRuntime>
3972
3980
  type SelectionResult<TSelection extends Record<string, ColumnSelectionValue>> = {
3973
3981
  [K in keyof TSelection]: SelectionValueType<TSelection[K]>;
3974
3982
  };
3983
+ type ParamOperandOptions$1 = {
3984
+ allowParamOperands?: boolean;
3985
+ };
3975
3986
  type SelectionFromKeys<TTable extends TableDef, K extends keyof TTable['columns'] & string> = Pick<InferRow<TTable>, K>;
3976
3987
  type DeepSelectEntry<TTable extends TableDef> = {
3977
3988
  type: 'root';
@@ -4338,7 +4349,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4338
4349
  * // users is User[]
4339
4350
  * users[0] instanceof User; // true
4340
4351
  */
4341
- execute(ctx: OrmSession): Promise<T[]>;
4352
+ execute(ctx: OrmSession, options?: ParamOperandOptions$1): Promise<T[]>;
4342
4353
  /**
4343
4354
  * Executes the query and returns plain row objects (POJOs), ignoring any entity materialization.
4344
4355
  * Use this if you want raw data even when using selectFromEntity.
@@ -4350,7 +4361,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4350
4361
  * // rows is EntityInstance<UserTable>[] (plain objects)
4351
4362
  * rows[0] instanceof User; // false
4352
4363
  */
4353
- executePlain(ctx: OrmSession): Promise<EntityInstance<TTable>[]>;
4364
+ executePlain(ctx: OrmSession, options?: ParamOperandOptions$1): Promise<EntityInstance<TTable>[]>;
4354
4365
  /**
4355
4366
  * Executes the query and returns results as real class instances.
4356
4367
  * Unlike execute(), this returns actual instances of the decorated entity class
@@ -4365,14 +4376,14 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4365
4376
  * users[0] instanceof User; // true!
4366
4377
  * users[0].getFullName(); // works!
4367
4378
  */
4368
- executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession): Promise<TEntity[]>;
4379
+ executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession, options?: ParamOperandOptions$1): Promise<TEntity[]>;
4369
4380
  /**
4370
4381
  * Executes a count query for the current builder without LIMIT/OFFSET clauses.
4371
4382
  *
4372
4383
  * @example
4373
4384
  * const total = await qb.count(session);
4374
4385
  */
4375
- count(session: OrmSession): Promise<number>;
4386
+ count(session: OrmSession, options?: ParamOperandOptions$1): Promise<number>;
4376
4387
  /**
4377
4388
  * Executes the query and returns both the paged items and the total.
4378
4389
  *
@@ -4382,7 +4393,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4382
4393
  executePaged(session: OrmSession, options: {
4383
4394
  page: number;
4384
4395
  pageSize: number;
4385
- }): Promise<PaginatedResult<T>>;
4396
+ } & ParamOperandOptions$1): Promise<PaginatedResult<T>>;
4386
4397
  /**
4387
4398
  * Executes the query with provided execution and hydration contexts
4388
4399
  * @param execCtx - Execution context
@@ -4393,7 +4404,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4393
4404
  * const hydCtx = new HydrationContext();
4394
4405
  * const users = await qb.executeWithContexts(execCtx, hydCtx);
4395
4406
  */
4396
- executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext): Promise<T[]>;
4407
+ executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext, options?: ParamOperandOptions$1): Promise<T[]>;
4397
4408
  /**
4398
4409
  * Adds a WHERE condition to the query
4399
4410
  * @param expr - Expression for the WHERE clause
@@ -4565,7 +4576,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4565
4576
  * .compile('postgres');
4566
4577
  * console.log(compiled.sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
4567
4578
  */
4568
- compile(dialect: SelectDialectInput): CompiledQuery;
4579
+ compile(dialect: SelectDialectInput, options?: ParamOperandOptions$1): CompiledQuery;
4569
4580
  /**
4570
4581
  * Converts the query to SQL string for a specific dialect
4571
4582
  * @param dialect - Database dialect to generate SQL for
@@ -4576,7 +4587,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
4576
4587
  * .toSql('postgres');
4577
4588
  * console.log(sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
4578
4589
  */
4579
- toSql(dialect: SelectDialectInput): string;
4590
+ toSql(dialect: SelectDialectInput, options?: ParamOperandOptions$1): string;
4580
4591
  /**
4581
4592
  * Gets hydration plan for query
4582
4593
  * @returns Hydration plan or undefined if none exists
@@ -6756,6 +6767,9 @@ declare class DefaultManyToManyCollection<TTarget, TPivot extends object | undef
6756
6767
  toJSON(): TTarget[];
6757
6768
  }
6758
6769
 
6770
+ type ParamOperandOptions = {
6771
+ allowParamOperands?: boolean;
6772
+ };
6759
6773
  /**
6760
6774
  * Executes a hydrated query using the ORM session.
6761
6775
  * @template TTable - The table type
@@ -6763,7 +6777,7 @@ declare class DefaultManyToManyCollection<TTarget, TPivot extends object | undef
6763
6777
  * @param qb - The select query builder
6764
6778
  * @returns Promise resolving to array of entity instances
6765
6779
  */
6766
- declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
6780
+ declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<EntityInstance<TTable>[]>;
6767
6781
  /**
6768
6782
  * Executes a hydrated query and returns plain row objects (no entity proxies).
6769
6783
  * @template TTable - The table type
@@ -6771,7 +6785,7 @@ declare function executeHydrated<TTable extends TableDef>(session: OrmSession, q
6771
6785
  * @param qb - The select query builder
6772
6786
  * @returns Promise resolving to array of plain row objects
6773
6787
  */
6774
- declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
6788
+ declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<Record<string, unknown>[]>;
6775
6789
  /**
6776
6790
  * Executes a hydrated query using execution and hydration contexts.
6777
6791
  * @template TTable - The table type
@@ -6780,7 +6794,7 @@ declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSessi
6780
6794
  * @param qb - The select query builder
6781
6795
  * @returns Promise resolving to array of entity instances
6782
6796
  */
6783
- declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
6797
+ declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<EntityInstance<TTable>[]>;
6784
6798
  /**
6785
6799
  * Executes a hydrated query using execution context and returns plain row objects.
6786
6800
  * @template TTable - The table type
@@ -6788,7 +6802,7 @@ declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: E
6788
6802
  * @param qb - The select query builder
6789
6803
  * @returns Promise resolving to array of plain row objects
6790
6804
  */
6791
- declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
6805
+ declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable>, options?: ParamOperandOptions): Promise<Record<string, unknown>[]>;
6792
6806
 
6793
6807
  type JsonifyScalar<T> = T extends Date ? string : T;
6794
6808
  /**
@@ -7220,4 +7234,4 @@ type PooledExecutorFactoryOptions<TConn> = {
7220
7234
  */
7221
7235
  declare function createPooledExecutorFactory<TConn>(opts: PooledExecutorFactoryOptions<TConn>): DbExecutorFactory;
7222
7236
 
7223
- export { type AliasRefNode, type AnyDomainEvent, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, type BinaryExpressionNode, type BitwiseExpressionNode, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnSchemaOptions, type ColumnToTs, type ColumnType, ConstructorMaterializationStrategy, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DbExecutor, type DbExecutorFactory, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecutionContext, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, 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 InputRelationMode, type InputSchemaMode, type InputSchemaOptions, InsertQueryBuilder, InterceptorPipeline, type IntrospectOptions, type JsonPathNode, type JsonSchemaFormat, type JsonSchemaProperty, type JsonSchemaType, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NullExpressionNode, type OpenApiParameter, type OpenApiSchema, type OpenApiSchemaBundle, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type OutputSchemaOptions, type PaginatedResult, type ParamNode, type ParamProxy, type ParamProxyRoot, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, PrototypeMaterializationStrategy, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, 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 SchemaExtractionContext, type SchemaGenerateResult, type SchemaIntrospector, type SchemaOptions, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeScriptGenerator, type TypedExpression, type TypedLike, UpdateQueryBuilder, type ValueOperandInput, type WindowFunctionNode, abs, acos, add, addDomainEvent, age, aliasRef, and, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterParameters, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, concat, concatWs, correlateBy, cos, cot, count, countAll, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createParamProxy, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, endOfMonth, entityRef, entityRefs, eq, esel, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractSchema, firstValue, floor, fromUnixTime, generateCreateTableSql, generateSchemaSql, generateSchemaSqlFor, getColumn, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, getTemporalFormat, greatest, groupConcat, gt, gte, hasMany, hasOne, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, 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, mapColumnType, mapRelationType, materializeAs, max, md5, min, minute, mod, month, mul, neq, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pi, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toTableRef, trim, trunc, truncate, unixTimestamp, update, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, windowFunction, year };
7237
+ export { type AliasRefNode, type AnyDomainEvent, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, type BinaryExpressionNode, type BitwiseExpressionNode, type CascadeMode, type CaseExpressionNode, type CastExpressionNode, type CheckConstraint, type CollateExpressionNode, Column, type ColumnDef, type ColumnDiff, type ColumnInput, type ColumnNode, type ColumnOptions, type ColumnRef, type ColumnSchemaOptions, type ColumnToTs, type ColumnType, ConstructorMaterializationStrategy, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DbExecutor, type DbExecutorFactory, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, Entity, type EntityContext, type EntityInstance, type EntityMaterializationStrategy, type EntityMaterializer, type EntityOptions, type PrimaryKey$1 as EntityPrimaryKey, EntityStatus, type ExecutionContext, type ExistsExpressionNode, type ExpressionNode, type ExpressionVisitor, 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 InputRelationMode, type InputSchemaMode, type InputSchemaOptions, InsertQueryBuilder, InterceptorPipeline, type IntrospectOptions, type JsonPathNode, type JsonSchemaFormat, type JsonSchemaProperty, type JsonSchemaType, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NullExpressionNode, type OpenApiParameter, type OpenApiSchema, type OpenApiSchemaBundle, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type OutputSchemaOptions, type PaginatedResult, type ParamNode, type ParamProxy, type ParamProxyRoot, Pool, type PoolAdapter, type PoolLease, type PoolOptions, type PooledConnectionAdapter, type PostgresClientLike, PostgresDialect, PrimaryKey, type Primitive, PrototypeMaterializationStrategy, type QueryContext, type QueryInterceptor, type QueryLogEntry, type QueryLogger, type QueryResult, type RawDefaultValue, type ReferentialAction, type RelationChange, type RelationChangeEntry, type RelationDef, 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 SchemaExtractionContext, type SchemaGenerateResult, type SchemaIntrospector, type SchemaOptions, type SchemaPlan, SelectQueryBuilder, type SelectQueryInput, type SelectableKeys, type SimpleQueryRunner, SqlServerDialect, type SqliteClientLike, SqliteDialect, type StandardColumnType, type SynchronizeOptions, type TableDef, type TableHooks, type TableOptions, type TableRef$1 as TableRef, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeScriptGenerator, type TypedExpression, type TypedLike, UpdateQueryBuilder, type ValueOperandInput, type WindowFunctionNode, abs, acos, add, addDomainEvent, age, aliasRef, and, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterParameters, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, concat, concatWs, correlateBy, cos, cot, count, countAll, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createParamProxy, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, endOfMonth, entityRef, entityRefs, eq, esel, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractSchema, firstValue, floor, fromUnixTime, generateCreateTableSql, generateSchemaSql, generateSchemaSqlFor, getColumn, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, getTemporalFormat, greatest, groupConcat, gt, gte, hasExpressionDispatcher, hasMany, hasOne, hasOperandDispatcher, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, 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, mapColumnType, mapRelationType, materializeAs, max, md5, min, minute, mod, month, mul, neq, normalizeColumnType, notBetween, notExists, notInList, notInSubquery, notLike, now, ntile, nullif, octetLength, or, outerRef, pi, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toTableRef, trim, trunc, truncate, unixTimestamp, update, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, windowFunction, year };