metal-orm 1.0.90 → 1.0.91

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
@@ -23,7 +23,7 @@ type ReferentialAction = 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SE
23
23
  interface RawDefaultValue {
24
24
  raw: string;
25
25
  }
26
- type DefaultValue = unknown | RawDefaultValue;
26
+ type DefaultValue = string | number | boolean | Date | null | RawDefaultValue;
27
27
  interface ForeignKeyReference {
28
28
  /** Target table name */
29
29
  table: string;
@@ -69,7 +69,7 @@ interface ColumnDef<T extends ColumnType = ColumnType, TRuntime = unknown> {
69
69
  /** Column comment/description */
70
70
  comment?: string;
71
71
  /** Additional arguments for the column type (e.g., VARCHAR length) */
72
- args?: unknown[];
72
+ args?: (string | number)[];
73
73
  /** Table name this column belongs to (filled at runtime by defineTable) */
74
74
  table?: string;
75
75
  }
@@ -161,7 +161,7 @@ declare const col: {
161
161
  */
162
162
  custom: (type: string, opts?: {
163
163
  dialect?: string;
164
- args?: unknown[];
164
+ args?: (string | number)[];
165
165
  tsType?: unknown;
166
166
  }) => ColumnDef;
167
167
  /**
@@ -181,7 +181,7 @@ declare const col: {
181
181
  /**
182
182
  * Sets a default value for the column
183
183
  */
184
- default: <T extends ColumnType>(def: ColumnDef<T>, value: unknown) => ColumnDef<T>;
184
+ default: <T extends ColumnType>(def: ColumnDef<T>, value: DefaultValue) => ColumnDef<T>;
185
185
  /**
186
186
  * Sets a raw SQL default value for the column
187
187
  */
@@ -445,13 +445,18 @@ declare function getColumn<T extends TableDef>(table: T, key: string): ColumnDef
445
445
  * Resolves a relation definition to its target table type.
446
446
  */
447
447
  type RelationTargetTable<TRel extends RelationDef> = TRel extends HasManyRelation<infer TTarget> ? TTarget : TRel extends HasOneRelation<infer TTarget> ? TTarget : TRel extends BelongsToRelation<infer TTarget> ? TTarget : TRel extends BelongsToManyRelation<infer TTarget, TableDef> ? TTarget : never;
448
+ type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
449
+ type JsonArray = Array<JsonValue>;
450
+ interface JsonObject {
451
+ [key: string]: JsonValue;
452
+ }
448
453
  type NormalizedColumnType<T extends ColumnDef> = Lowercase<T['type'] & string>;
449
454
  /**
450
455
  * Maps a ColumnDef to its TypeScript type representation
451
456
  */
452
457
  type ColumnToTs<T extends ColumnDef> = [
453
458
  unknown
454
- ] extends [T['tsType']] ? NormalizedColumnType<T> extends 'int' | 'integer' ? number : NormalizedColumnType<T> extends 'bigint' ? number | bigint : NormalizedColumnType<T> extends 'decimal' | 'float' | 'double' ? number : NormalizedColumnType<T> extends 'boolean' ? boolean : NormalizedColumnType<T> extends 'json' ? unknown : NormalizedColumnType<T> extends 'blob' | 'binary' | 'varbinary' | 'bytea' ? Buffer : NormalizedColumnType<T> extends 'date' | 'datetime' | 'timestamp' | 'timestamptz' ? string : string : Exclude<T['tsType'], undefined>;
459
+ ] extends [T['tsType']] ? NormalizedColumnType<T> extends 'int' | 'integer' ? number : NormalizedColumnType<T> extends 'bigint' ? number | bigint : NormalizedColumnType<T> extends 'decimal' | 'float' | 'double' ? number : NormalizedColumnType<T> extends 'boolean' ? boolean : NormalizedColumnType<T> extends 'json' ? JsonValue : NormalizedColumnType<T> extends 'blob' | 'binary' | 'varbinary' | 'bytea' ? Buffer : NormalizedColumnType<T> extends 'date' | 'datetime' | 'timestamp' | 'timestamptz' ? string : string : Exclude<T['tsType'], undefined>;
455
460
  /**
456
461
  * Infers a row shape from a table definition
457
462
  */
@@ -7340,7 +7345,7 @@ type FilterValue = StringFilter | NumberFilter | BooleanFilter | DateFilter;
7340
7345
  * // SQL: WHERE name LIKE '%john%' AND email LIKE '%@gmail.com'
7341
7346
  * ```
7342
7347
  */
7343
- declare function applyFilter<T, TTable extends TableDef>(qb: SelectQueryBuilder<T, TTable>, tableOrEntity: TTable | EntityConstructor, where?: WhereInput<any> | null): SelectQueryBuilder<T, TTable>;
7348
+ declare function applyFilter<T, TTable extends TableDef>(qb: SelectQueryBuilder<T, TTable>, tableOrEntity: TTable | EntityConstructor, where?: WhereInput<TTable | EntityConstructor> | null): SelectQueryBuilder<T, TTable>;
7344
7349
  /**
7345
7350
  * Builds an expression tree from a filter object without applying it.
7346
7351
  * Useful for combining with other conditions.
@@ -7362,7 +7367,7 @@ declare function applyFilter<T, TTable extends TableDef>(qb: SelectQueryBuilder<
7362
7367
  * }
7363
7368
  * ```
7364
7369
  */
7365
- declare function buildFilterExpression(tableOrEntity: TableDef | EntityConstructor, where?: WhereInput<any> | null): ExpressionNode | null;
7370
+ declare function buildFilterExpression(tableOrEntity: TableDef | EntityConstructor, where?: WhereInput<TableDef | EntityConstructor> | null): ExpressionNode | null;
7366
7371
 
7367
7372
  /**
7368
7373
  * DTO transformation utilities for working with DTO instances.
@@ -7473,7 +7478,10 @@ declare function pick<T extends object, K extends keyof T>(obj: T, ...keys: K[])
7473
7478
  * });
7474
7479
  * ```
7475
7480
  */
7476
- declare function mapFields<T extends object>(obj: T, fieldMap: Partial<Record<keyof T, string>>): Record<string, unknown>;
7481
+ type MappedFields<T, M extends Partial<Record<keyof T, string>>> = {
7482
+ [K in keyof M as M[K] extends string ? M[K] : never]: K extends keyof T ? T[K] : never;
7483
+ };
7484
+ declare function mapFields<T extends object, M extends Partial<Record<keyof T, string>>>(obj: T, fieldMap: M): Omit<T, keyof M> & MappedFields<T, M>;
7477
7485
 
7478
7486
  /**
7479
7487
  * Pagination utility functions for DTO responses.
@@ -7638,6 +7646,12 @@ interface OpenApiComponent {
7638
7646
  responses?: Record<string, OpenApiSchema>;
7639
7647
  securitySchemes?: Record<string, unknown>;
7640
7648
  }
7649
+ interface OpenApiDocument {
7650
+ openapi: string;
7651
+ info: OpenApiDocumentInfo;
7652
+ paths: Record<string, Record<string, OpenApiOperation>>;
7653
+ components?: OpenApiComponent;
7654
+ }
7641
7655
 
7642
7656
  interface TypeMappingStrategy {
7643
7657
  supports(columnType: string): boolean;
@@ -7706,7 +7720,7 @@ declare function columnTypeToOpenApiFormat(col: ColumnDef): string | undefined;
7706
7720
  declare function schemaToJson(schema: OpenApiSchema): string;
7707
7721
  declare function deepCloneSchema(schema: OpenApiSchema): OpenApiSchema;
7708
7722
  declare function mergeSchemas(base: OpenApiSchema, override: Partial<OpenApiSchema>): OpenApiSchema;
7709
- declare function generateOpenApiDocument(info: OpenApiDocumentInfo, routes: ApiRouteDefinition[]): Record<string, unknown>;
7723
+ declare function generateOpenApiDocument(info: OpenApiDocumentInfo, routes: ApiRouteDefinition[]): OpenApiDocument;
7710
7724
 
7711
7725
  declare function isTableDef(target: TableDef | EntityConstructor): target is TableDef;
7712
7726
  declare function getColumnMap(target: TableDef | EntityConstructor): Record<string, ColumnDef>;
@@ -7775,4 +7789,4 @@ declare const paginationParamsSchema: OpenApiSchema;
7775
7789
  declare function toPaginationParams(): OpenApiParameter[];
7776
7790
  declare function pagedResponseToOpenApiSchema<T extends OpenApiSchema>(itemSchema: T): OpenApiSchema;
7777
7791
 
7778
- export { type AliasRefNode, type AnyDomainEvent, type ApiRouteDefinition, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, 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, ConstructorMaterializationStrategy, type CreateDto, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, 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 FieldFilter, type FilterOperator, type FilterValue, 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 JsonPathNode, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDocumentInfo, type OpenApiOperation, type OpenApiParameter, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, 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 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, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, UuidTypeStrategy, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, age, aliasRef, and, applyFilter, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, calculateTotalPages, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, firstValue, floor, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, getColumn, getColumnMap, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, isTableDef, 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, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
7792
+ export { type AliasRefNode, type AnyDomainEvent, type ApiRouteDefinition, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, 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, ConstructorMaterializationStrategy, type CreateDto, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, 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 FieldFilter, type FilterOperator, type FilterValue, 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 JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiOperation, type OpenApiParameter, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, 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 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, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, UuidTypeStrategy, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, age, aliasRef, and, applyFilter, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, calculateTotalPages, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, firstValue, floor, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, getColumn, getColumnMap, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, isTableDef, 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, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
package/dist/index.d.ts CHANGED
@@ -23,7 +23,7 @@ type ReferentialAction = 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SE
23
23
  interface RawDefaultValue {
24
24
  raw: string;
25
25
  }
26
- type DefaultValue = unknown | RawDefaultValue;
26
+ type DefaultValue = string | number | boolean | Date | null | RawDefaultValue;
27
27
  interface ForeignKeyReference {
28
28
  /** Target table name */
29
29
  table: string;
@@ -69,7 +69,7 @@ interface ColumnDef<T extends ColumnType = ColumnType, TRuntime = unknown> {
69
69
  /** Column comment/description */
70
70
  comment?: string;
71
71
  /** Additional arguments for the column type (e.g., VARCHAR length) */
72
- args?: unknown[];
72
+ args?: (string | number)[];
73
73
  /** Table name this column belongs to (filled at runtime by defineTable) */
74
74
  table?: string;
75
75
  }
@@ -161,7 +161,7 @@ declare const col: {
161
161
  */
162
162
  custom: (type: string, opts?: {
163
163
  dialect?: string;
164
- args?: unknown[];
164
+ args?: (string | number)[];
165
165
  tsType?: unknown;
166
166
  }) => ColumnDef;
167
167
  /**
@@ -181,7 +181,7 @@ declare const col: {
181
181
  /**
182
182
  * Sets a default value for the column
183
183
  */
184
- default: <T extends ColumnType>(def: ColumnDef<T>, value: unknown) => ColumnDef<T>;
184
+ default: <T extends ColumnType>(def: ColumnDef<T>, value: DefaultValue) => ColumnDef<T>;
185
185
  /**
186
186
  * Sets a raw SQL default value for the column
187
187
  */
@@ -445,13 +445,18 @@ declare function getColumn<T extends TableDef>(table: T, key: string): ColumnDef
445
445
  * Resolves a relation definition to its target table type.
446
446
  */
447
447
  type RelationTargetTable<TRel extends RelationDef> = TRel extends HasManyRelation<infer TTarget> ? TTarget : TRel extends HasOneRelation<infer TTarget> ? TTarget : TRel extends BelongsToRelation<infer TTarget> ? TTarget : TRel extends BelongsToManyRelation<infer TTarget, TableDef> ? TTarget : never;
448
+ type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
449
+ type JsonArray = Array<JsonValue>;
450
+ interface JsonObject {
451
+ [key: string]: JsonValue;
452
+ }
448
453
  type NormalizedColumnType<T extends ColumnDef> = Lowercase<T['type'] & string>;
449
454
  /**
450
455
  * Maps a ColumnDef to its TypeScript type representation
451
456
  */
452
457
  type ColumnToTs<T extends ColumnDef> = [
453
458
  unknown
454
- ] extends [T['tsType']] ? NormalizedColumnType<T> extends 'int' | 'integer' ? number : NormalizedColumnType<T> extends 'bigint' ? number | bigint : NormalizedColumnType<T> extends 'decimal' | 'float' | 'double' ? number : NormalizedColumnType<T> extends 'boolean' ? boolean : NormalizedColumnType<T> extends 'json' ? unknown : NormalizedColumnType<T> extends 'blob' | 'binary' | 'varbinary' | 'bytea' ? Buffer : NormalizedColumnType<T> extends 'date' | 'datetime' | 'timestamp' | 'timestamptz' ? string : string : Exclude<T['tsType'], undefined>;
459
+ ] extends [T['tsType']] ? NormalizedColumnType<T> extends 'int' | 'integer' ? number : NormalizedColumnType<T> extends 'bigint' ? number | bigint : NormalizedColumnType<T> extends 'decimal' | 'float' | 'double' ? number : NormalizedColumnType<T> extends 'boolean' ? boolean : NormalizedColumnType<T> extends 'json' ? JsonValue : NormalizedColumnType<T> extends 'blob' | 'binary' | 'varbinary' | 'bytea' ? Buffer : NormalizedColumnType<T> extends 'date' | 'datetime' | 'timestamp' | 'timestamptz' ? string : string : Exclude<T['tsType'], undefined>;
455
460
  /**
456
461
  * Infers a row shape from a table definition
457
462
  */
@@ -7340,7 +7345,7 @@ type FilterValue = StringFilter | NumberFilter | BooleanFilter | DateFilter;
7340
7345
  * // SQL: WHERE name LIKE '%john%' AND email LIKE '%@gmail.com'
7341
7346
  * ```
7342
7347
  */
7343
- declare function applyFilter<T, TTable extends TableDef>(qb: SelectQueryBuilder<T, TTable>, tableOrEntity: TTable | EntityConstructor, where?: WhereInput<any> | null): SelectQueryBuilder<T, TTable>;
7348
+ declare function applyFilter<T, TTable extends TableDef>(qb: SelectQueryBuilder<T, TTable>, tableOrEntity: TTable | EntityConstructor, where?: WhereInput<TTable | EntityConstructor> | null): SelectQueryBuilder<T, TTable>;
7344
7349
  /**
7345
7350
  * Builds an expression tree from a filter object without applying it.
7346
7351
  * Useful for combining with other conditions.
@@ -7362,7 +7367,7 @@ declare function applyFilter<T, TTable extends TableDef>(qb: SelectQueryBuilder<
7362
7367
  * }
7363
7368
  * ```
7364
7369
  */
7365
- declare function buildFilterExpression(tableOrEntity: TableDef | EntityConstructor, where?: WhereInput<any> | null): ExpressionNode | null;
7370
+ declare function buildFilterExpression(tableOrEntity: TableDef | EntityConstructor, where?: WhereInput<TableDef | EntityConstructor> | null): ExpressionNode | null;
7366
7371
 
7367
7372
  /**
7368
7373
  * DTO transformation utilities for working with DTO instances.
@@ -7473,7 +7478,10 @@ declare function pick<T extends object, K extends keyof T>(obj: T, ...keys: K[])
7473
7478
  * });
7474
7479
  * ```
7475
7480
  */
7476
- declare function mapFields<T extends object>(obj: T, fieldMap: Partial<Record<keyof T, string>>): Record<string, unknown>;
7481
+ type MappedFields<T, M extends Partial<Record<keyof T, string>>> = {
7482
+ [K in keyof M as M[K] extends string ? M[K] : never]: K extends keyof T ? T[K] : never;
7483
+ };
7484
+ declare function mapFields<T extends object, M extends Partial<Record<keyof T, string>>>(obj: T, fieldMap: M): Omit<T, keyof M> & MappedFields<T, M>;
7477
7485
 
7478
7486
  /**
7479
7487
  * Pagination utility functions for DTO responses.
@@ -7638,6 +7646,12 @@ interface OpenApiComponent {
7638
7646
  responses?: Record<string, OpenApiSchema>;
7639
7647
  securitySchemes?: Record<string, unknown>;
7640
7648
  }
7649
+ interface OpenApiDocument {
7650
+ openapi: string;
7651
+ info: OpenApiDocumentInfo;
7652
+ paths: Record<string, Record<string, OpenApiOperation>>;
7653
+ components?: OpenApiComponent;
7654
+ }
7641
7655
 
7642
7656
  interface TypeMappingStrategy {
7643
7657
  supports(columnType: string): boolean;
@@ -7706,7 +7720,7 @@ declare function columnTypeToOpenApiFormat(col: ColumnDef): string | undefined;
7706
7720
  declare function schemaToJson(schema: OpenApiSchema): string;
7707
7721
  declare function deepCloneSchema(schema: OpenApiSchema): OpenApiSchema;
7708
7722
  declare function mergeSchemas(base: OpenApiSchema, override: Partial<OpenApiSchema>): OpenApiSchema;
7709
- declare function generateOpenApiDocument(info: OpenApiDocumentInfo, routes: ApiRouteDefinition[]): Record<string, unknown>;
7723
+ declare function generateOpenApiDocument(info: OpenApiDocumentInfo, routes: ApiRouteDefinition[]): OpenApiDocument;
7710
7724
 
7711
7725
  declare function isTableDef(target: TableDef | EntityConstructor): target is TableDef;
7712
7726
  declare function getColumnMap(target: TableDef | EntityConstructor): Record<string, ColumnDef>;
@@ -7775,4 +7789,4 @@ declare const paginationParamsSchema: OpenApiSchema;
7775
7789
  declare function toPaginationParams(): OpenApiParameter[];
7776
7790
  declare function pagedResponseToOpenApiSchema<T extends OpenApiSchema>(itemSchema: T): OpenApiSchema;
7777
7791
 
7778
- export { type AliasRefNode, type AnyDomainEvent, type ApiRouteDefinition, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, 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, ConstructorMaterializationStrategy, type CreateDto, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, 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 FieldFilter, type FilterOperator, type FilterValue, 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 JsonPathNode, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDocumentInfo, type OpenApiOperation, type OpenApiParameter, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, 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 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, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, UuidTypeStrategy, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, age, aliasRef, and, applyFilter, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, calculateTotalPages, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, firstValue, floor, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, getColumn, getColumnMap, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, isTableDef, 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, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };
7792
+ export { type AliasRefNode, type AnyDomainEvent, type ApiRouteDefinition, type ArithmeticExpressionNode, type TableRef as AstTableRef, AsyncLocalStorage, BelongsTo, BelongsToMany, type BelongsToManyOptions, type BelongsToManyRelation, type BelongsToOptions, type BelongsToReference, type BelongsToReferenceApi, type BelongsToRelation, type BetweenExpressionNode, BigIntTypeStrategy, type BinaryExpressionNode, type BitwiseExpressionNode, type BooleanFilter, BooleanTypeStrategy, 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, ConstructorMaterializationStrategy, type CreateDto, type CreateTediousClientOptions, type DatabaseCheck, type DatabaseColumn, type DatabaseIndex, type DatabaseSchema, type DatabaseTable, type DateFilter, DateTimeTypeStrategy, type DbExecutor, type DbExecutorFactory, DecimalTypeStrategy, type DecoratedEntityInstance, DefaultBelongsToReference, DefaultEntityMaterializer, DefaultHasManyCollection, DefaultManyToManyCollection, DefaultTypeStrategy, type DefaultValue, DeleteQueryBuilder, type DialectName, type DomainEvent, DomainEventBus, type DomainEventHandler, type Dto, 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 FieldFilter, type FilterOperator, type FilterValue, 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 JsonArray, type JsonObject, type JsonPathNode, type JsonValue, type Jsonify, type JsonifyScalar, type LiteralNode, type LiteralValue, type LogicalExpressionNode, type ManyToManyCollection, type MssqlClientLike, MySqlDialect, type MysqlClientLike, type NestedDtoOptions, type NullExpressionNode, type NumberFilter, type OpenApiComponent, type OpenApiDocument, type OpenApiDocumentInfo, type OpenApiOperation, type OpenApiParameter, type OpenApiSchema, type OpenApiType, type OperandNode, type OperandVisitor, Orm, type OrmDomainEvent, type OrmInterceptor, type OrmOptions, OrmSession, type OrmSessionOptions, type PagedResponse, type PaginatedResult, type PaginationParams, 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 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, type TargetType, type TediousColumn, type TediousConnectionLike, type TediousModule, type TediousRequest, type TediousRequestCtor, type TediousTypes, type TrackedEntity, TypeMappingService, type TypeMappingStrategy, TypeScriptGenerator, type TypedExpression, type TypedLike, type UpdateDto, UpdateQueryBuilder, UuidTypeStrategy, type ValueOperandInput, type WhereInput, type WindowFunctionNode, type WithRelations, abs, acos, add, addDomainEvent, age, aliasRef, and, applyFilter, arrayAppend, asType, ascii, asin, atan, atan2, avg, belongsTo, belongsToMany, between, bitAnd, bitLength, bitOr, bitXor, bootstrapEntities, buildFilterExpression, calculateTotalPages, caseWhen, cast, cbrt, ceil, ceiling, char, charLength, chr, clearExpressionDispatchers, clearOperandDispatchers, coalesce, col, collate, columnOperand, columnToOpenApiSchema, columnTypeToOpenApiFormat, columnTypeToOpenApiType, computePaginationMetadata, concat, concatWs, correlateBy, cos, cot, count, countAll, createApiComponentsSection, createDtoToOpenApiSchema, createEntityFromRow, createEntityProxy, createExecutorFromQueryRunner, createMssqlExecutor, createMysqlExecutor, createPooledExecutorFactory, createPostgresExecutor, createQueryLoggingExecutor, createRef, createSqliteExecutor, createTediousExecutor, createTediousMssqlClient, currentDate, currentTime, dateAdd, dateDiff, dateFormat, dateSub, dateTrunc, day, dayOfWeek, deepCloneSchema, defineTable, degrees, deleteFrom, denseRank, diffSchema, div, dtoToOpenApiSchema, endOfMonth, entityRef, entityRefs, eq, esel, exclude, executeHydrated, executeHydratedPlain, executeHydratedPlainWithContexts, executeHydratedWithContexts, executeSchemaSql, executeSchemaSqlFor, exists, exp, extract, extractReusableSchemas, firstValue, floor, fromUnixTime, generateComponentSchemas, generateCreateTableSql, generateOpenApiDocument, generateRelationComponents, generateSchemaSql, generateSchemaSqlFor, getColumn, getColumnMap, getDecoratorMetadata, getSchemaIntrospector, getTableDefFromEntity, greatest, groupConcat, gt, gte, hasMany, hasNextPage as hasNextPageMeta, hasOne, hasPrevPage as hasPrevPageMeta, hour, hydrateRows, ifNull, inList, inSubquery, initcap, insertInto, instr, introspectSchema, isCaseExpressionNode, isCastExpressionNode, isCollateExpressionNode, isComponentReference, isExpressionSelectionNode, isFunctionNode, isNotNull, isNull, isOperandNode, isTableDef, 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, pi, pick, position, pow, power, quarter, radians, rand, random, rank, registerExpressionDispatcher, registerOperandDispatcher, registerSchemaIntrospector, relationFilterToOpenApiSchema, relationLoaderCache, renderColumnDefinition, renderTypeWithArgs, repeat, replace, replaceWithRefs, responseToRef, reverse, right, round, rowNumber, rowsToQueryResult, rpad, rtrim, schemaToJson, schemaToRef, second, sel, selectFrom, selectFromEntity, setRelations, sha1, sha2, shiftLeft, shiftRight, sign, sin, space, sqrt, stddev, sub, substr, sum, synchronizeSchema, tableRef, tan, toColumnRef, toPagedResponse, toPagedResponseBuilder, toPaginationParams, toResponse, toResponseBuilder, toTableRef, trim, trunc, truncate, typeMappingService, unixTimestamp, update, updateDtoToOpenApiSchema, updateDtoWithRelationsToOpenApiSchema, upper, utcNow, valueToOperand, variance, visitExpression, visitOperand, weekOfYear, whereInputToOpenApiSchema, whereInputWithRelationsToOpenApiSchema, windowFunction, withDefaults, withDefaultsBuilder, year };