metal-orm 1.0.86 → 1.0.88
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.cjs +210 -97
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -17
- package/dist/index.d.ts +29 -17
- package/dist/index.js +210 -97
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/openapi/schema-extractor-input.ts +139 -0
- package/src/openapi/schema-extractor-output.ts +427 -0
- package/src/openapi/schema-extractor-utils.ts +110 -0
- package/src/openapi/schema-extractor.ts +41 -516
- package/src/openapi/schema-types.ts +18 -0
- package/src/orm/execute.ts +12 -26
- package/src/query-builder/select/select-operations.ts +4 -12
- package/src/query-builder/select.ts +23 -25
package/dist/index.d.cts
CHANGED
|
@@ -3872,6 +3872,12 @@ interface OpenApiSchema {
|
|
|
3872
3872
|
required: string[];
|
|
3873
3873
|
description?: string;
|
|
3874
3874
|
}
|
|
3875
|
+
/**
|
|
3876
|
+
* OpenAPI 3.1 components container
|
|
3877
|
+
*/
|
|
3878
|
+
interface OpenApiComponents {
|
|
3879
|
+
schemas: Record<string, OpenApiSchema>;
|
|
3880
|
+
}
|
|
3875
3881
|
/**
|
|
3876
3882
|
* Column-level schema flags
|
|
3877
3883
|
*/
|
|
@@ -3895,6 +3901,12 @@ interface OutputSchemaOptions extends ColumnSchemaOptions {
|
|
|
3895
3901
|
mode?: 'selected' | 'full';
|
|
3896
3902
|
/** Maximum depth for relation recursion */
|
|
3897
3903
|
maxDepth?: number;
|
|
3904
|
+
/** Inline schemas vs $ref components */
|
|
3905
|
+
refMode?: 'inline' | 'components';
|
|
3906
|
+
/** Selected schemas inline vs components when refMode is components */
|
|
3907
|
+
selectedRefMode?: 'inline' | 'components';
|
|
3908
|
+
/** Customize component names */
|
|
3909
|
+
componentName?: (table: TableDef) => string;
|
|
3898
3910
|
}
|
|
3899
3911
|
type InputRelationMode = 'ids' | 'objects' | 'mixed';
|
|
3900
3912
|
type InputSchemaMode = 'create' | 'update';
|
|
@@ -3931,6 +3943,7 @@ interface OpenApiSchemaBundle {
|
|
|
3931
3943
|
output: OpenApiSchema;
|
|
3932
3944
|
input?: OpenApiSchema;
|
|
3933
3945
|
parameters?: OpenApiParameter[];
|
|
3946
|
+
components?: OpenApiComponents;
|
|
3934
3947
|
}
|
|
3935
3948
|
/**
|
|
3936
3949
|
* Schema extraction context for handling circular references
|
|
@@ -3944,6 +3957,8 @@ interface SchemaExtractionContext {
|
|
|
3944
3957
|
depth: number;
|
|
3945
3958
|
/** Maximum depth to recurse */
|
|
3946
3959
|
maxDepth: number;
|
|
3960
|
+
/** Component registry when using refMode=components */
|
|
3961
|
+
components?: OpenApiComponents;
|
|
3947
3962
|
}
|
|
3948
3963
|
|
|
3949
3964
|
/**
|
|
@@ -3980,7 +3995,7 @@ type SelectionValueType<TValue> = TValue extends TypedExpression<infer TRuntime>
|
|
|
3980
3995
|
type SelectionResult<TSelection extends Record<string, ColumnSelectionValue>> = {
|
|
3981
3996
|
[K in keyof TSelection]: SelectionValueType<TSelection[K]>;
|
|
3982
3997
|
};
|
|
3983
|
-
type
|
|
3998
|
+
type ParamOperandCompileOptions = {
|
|
3984
3999
|
allowParamOperands?: boolean;
|
|
3985
4000
|
};
|
|
3986
4001
|
type SelectionFromKeys<TTable extends TableDef, K extends keyof TTable['columns'] & string> = Pick<InferRow<TTable>, K>;
|
|
@@ -4349,7 +4364,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4349
4364
|
* // users is User[]
|
|
4350
4365
|
* users[0] instanceof User; // true
|
|
4351
4366
|
*/
|
|
4352
|
-
execute(ctx: OrmSession
|
|
4367
|
+
execute(ctx: OrmSession): Promise<T[]>;
|
|
4353
4368
|
/**
|
|
4354
4369
|
* Executes the query and returns plain row objects (POJOs), ignoring any entity materialization.
|
|
4355
4370
|
* Use this if you want raw data even when using selectFromEntity.
|
|
@@ -4361,7 +4376,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4361
4376
|
* // rows is EntityInstance<UserTable>[] (plain objects)
|
|
4362
4377
|
* rows[0] instanceof User; // false
|
|
4363
4378
|
*/
|
|
4364
|
-
executePlain(ctx: OrmSession
|
|
4379
|
+
executePlain(ctx: OrmSession): Promise<EntityInstance<TTable>[]>;
|
|
4365
4380
|
/**
|
|
4366
4381
|
* Executes the query and returns results as real class instances.
|
|
4367
4382
|
* Unlike execute(), this returns actual instances of the decorated entity class
|
|
@@ -4376,14 +4391,14 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4376
4391
|
* users[0] instanceof User; // true!
|
|
4377
4392
|
* users[0].getFullName(); // works!
|
|
4378
4393
|
*/
|
|
4379
|
-
executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession
|
|
4394
|
+
executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession): Promise<TEntity[]>;
|
|
4380
4395
|
/**
|
|
4381
4396
|
* Executes a count query for the current builder without LIMIT/OFFSET clauses.
|
|
4382
4397
|
*
|
|
4383
4398
|
* @example
|
|
4384
4399
|
* const total = await qb.count(session);
|
|
4385
4400
|
*/
|
|
4386
|
-
count(session: OrmSession
|
|
4401
|
+
count(session: OrmSession): Promise<number>;
|
|
4387
4402
|
/**
|
|
4388
4403
|
* Executes the query and returns both the paged items and the total.
|
|
4389
4404
|
*
|
|
@@ -4393,7 +4408,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4393
4408
|
executePaged(session: OrmSession, options: {
|
|
4394
4409
|
page: number;
|
|
4395
4410
|
pageSize: number;
|
|
4396
|
-
}
|
|
4411
|
+
}): Promise<PaginatedResult<T>>;
|
|
4397
4412
|
/**
|
|
4398
4413
|
* Executes the query with provided execution and hydration contexts
|
|
4399
4414
|
* @param execCtx - Execution context
|
|
@@ -4404,7 +4419,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4404
4419
|
* const hydCtx = new HydrationContext();
|
|
4405
4420
|
* const users = await qb.executeWithContexts(execCtx, hydCtx);
|
|
4406
4421
|
*/
|
|
4407
|
-
executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext
|
|
4422
|
+
executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext): Promise<T[]>;
|
|
4408
4423
|
/**
|
|
4409
4424
|
* Adds a WHERE condition to the query
|
|
4410
4425
|
* @param expr - Expression for the WHERE clause
|
|
@@ -4576,7 +4591,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4576
4591
|
* .compile('postgres');
|
|
4577
4592
|
* console.log(compiled.sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
|
|
4578
4593
|
*/
|
|
4579
|
-
compile(dialect: SelectDialectInput, options?:
|
|
4594
|
+
compile(dialect: SelectDialectInput, options?: ParamOperandCompileOptions): CompiledQuery;
|
|
4580
4595
|
/**
|
|
4581
4596
|
* Converts the query to SQL string for a specific dialect
|
|
4582
4597
|
* @param dialect - Database dialect to generate SQL for
|
|
@@ -4587,7 +4602,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4587
4602
|
* .toSql('postgres');
|
|
4588
4603
|
* console.log(sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
|
|
4589
4604
|
*/
|
|
4590
|
-
toSql(dialect: SelectDialectInput, options?:
|
|
4605
|
+
toSql(dialect: SelectDialectInput, options?: ParamOperandCompileOptions): string;
|
|
4591
4606
|
/**
|
|
4592
4607
|
* Gets hydration plan for query
|
|
4593
4608
|
* @returns Hydration plan or undefined if none exists
|
|
@@ -6767,9 +6782,6 @@ declare class DefaultManyToManyCollection<TTarget, TPivot extends object | undef
|
|
|
6767
6782
|
toJSON(): TTarget[];
|
|
6768
6783
|
}
|
|
6769
6784
|
|
|
6770
|
-
type ParamOperandOptions = {
|
|
6771
|
-
allowParamOperands?: boolean;
|
|
6772
|
-
};
|
|
6773
6785
|
/**
|
|
6774
6786
|
* Executes a hydrated query using the ORM session.
|
|
6775
6787
|
* @template TTable - The table type
|
|
@@ -6777,7 +6789,7 @@ type ParamOperandOptions = {
|
|
|
6777
6789
|
* @param qb - The select query builder
|
|
6778
6790
|
* @returns Promise resolving to array of entity instances
|
|
6779
6791
|
*/
|
|
6780
|
-
declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable
|
|
6792
|
+
declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
|
|
6781
6793
|
/**
|
|
6782
6794
|
* Executes a hydrated query and returns plain row objects (no entity proxies).
|
|
6783
6795
|
* @template TTable - The table type
|
|
@@ -6785,7 +6797,7 @@ declare function executeHydrated<TTable extends TableDef>(session: OrmSession, q
|
|
|
6785
6797
|
* @param qb - The select query builder
|
|
6786
6798
|
* @returns Promise resolving to array of plain row objects
|
|
6787
6799
|
*/
|
|
6788
|
-
declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable
|
|
6800
|
+
declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
|
|
6789
6801
|
/**
|
|
6790
6802
|
* Executes a hydrated query using execution and hydration contexts.
|
|
6791
6803
|
* @template TTable - The table type
|
|
@@ -6794,7 +6806,7 @@ declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSessi
|
|
|
6794
6806
|
* @param qb - The select query builder
|
|
6795
6807
|
* @returns Promise resolving to array of entity instances
|
|
6796
6808
|
*/
|
|
6797
|
-
declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable
|
|
6809
|
+
declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
|
|
6798
6810
|
/**
|
|
6799
6811
|
* Executes a hydrated query using execution context and returns plain row objects.
|
|
6800
6812
|
* @template TTable - The table type
|
|
@@ -6802,7 +6814,7 @@ declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: E
|
|
|
6802
6814
|
* @param qb - The select query builder
|
|
6803
6815
|
* @returns Promise resolving to array of plain row objects
|
|
6804
6816
|
*/
|
|
6805
|
-
declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable
|
|
6817
|
+
declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
|
|
6806
6818
|
|
|
6807
6819
|
type JsonifyScalar<T> = T extends Date ? string : T;
|
|
6808
6820
|
/**
|
|
@@ -7234,4 +7246,4 @@ type PooledExecutorFactoryOptions<TConn> = {
|
|
|
7234
7246
|
*/
|
|
7235
7247
|
declare function createPooledExecutorFactory<TConn>(opts: PooledExecutorFactoryOptions<TConn>): DbExecutorFactory;
|
|
7236
7248
|
|
|
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 };
|
|
7249
|
+
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 OpenApiComponents, 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
|
@@ -3872,6 +3872,12 @@ interface OpenApiSchema {
|
|
|
3872
3872
|
required: string[];
|
|
3873
3873
|
description?: string;
|
|
3874
3874
|
}
|
|
3875
|
+
/**
|
|
3876
|
+
* OpenAPI 3.1 components container
|
|
3877
|
+
*/
|
|
3878
|
+
interface OpenApiComponents {
|
|
3879
|
+
schemas: Record<string, OpenApiSchema>;
|
|
3880
|
+
}
|
|
3875
3881
|
/**
|
|
3876
3882
|
* Column-level schema flags
|
|
3877
3883
|
*/
|
|
@@ -3895,6 +3901,12 @@ interface OutputSchemaOptions extends ColumnSchemaOptions {
|
|
|
3895
3901
|
mode?: 'selected' | 'full';
|
|
3896
3902
|
/** Maximum depth for relation recursion */
|
|
3897
3903
|
maxDepth?: number;
|
|
3904
|
+
/** Inline schemas vs $ref components */
|
|
3905
|
+
refMode?: 'inline' | 'components';
|
|
3906
|
+
/** Selected schemas inline vs components when refMode is components */
|
|
3907
|
+
selectedRefMode?: 'inline' | 'components';
|
|
3908
|
+
/** Customize component names */
|
|
3909
|
+
componentName?: (table: TableDef) => string;
|
|
3898
3910
|
}
|
|
3899
3911
|
type InputRelationMode = 'ids' | 'objects' | 'mixed';
|
|
3900
3912
|
type InputSchemaMode = 'create' | 'update';
|
|
@@ -3931,6 +3943,7 @@ interface OpenApiSchemaBundle {
|
|
|
3931
3943
|
output: OpenApiSchema;
|
|
3932
3944
|
input?: OpenApiSchema;
|
|
3933
3945
|
parameters?: OpenApiParameter[];
|
|
3946
|
+
components?: OpenApiComponents;
|
|
3934
3947
|
}
|
|
3935
3948
|
/**
|
|
3936
3949
|
* Schema extraction context for handling circular references
|
|
@@ -3944,6 +3957,8 @@ interface SchemaExtractionContext {
|
|
|
3944
3957
|
depth: number;
|
|
3945
3958
|
/** Maximum depth to recurse */
|
|
3946
3959
|
maxDepth: number;
|
|
3960
|
+
/** Component registry when using refMode=components */
|
|
3961
|
+
components?: OpenApiComponents;
|
|
3947
3962
|
}
|
|
3948
3963
|
|
|
3949
3964
|
/**
|
|
@@ -3980,7 +3995,7 @@ type SelectionValueType<TValue> = TValue extends TypedExpression<infer TRuntime>
|
|
|
3980
3995
|
type SelectionResult<TSelection extends Record<string, ColumnSelectionValue>> = {
|
|
3981
3996
|
[K in keyof TSelection]: SelectionValueType<TSelection[K]>;
|
|
3982
3997
|
};
|
|
3983
|
-
type
|
|
3998
|
+
type ParamOperandCompileOptions = {
|
|
3984
3999
|
allowParamOperands?: boolean;
|
|
3985
4000
|
};
|
|
3986
4001
|
type SelectionFromKeys<TTable extends TableDef, K extends keyof TTable['columns'] & string> = Pick<InferRow<TTable>, K>;
|
|
@@ -4349,7 +4364,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4349
4364
|
* // users is User[]
|
|
4350
4365
|
* users[0] instanceof User; // true
|
|
4351
4366
|
*/
|
|
4352
|
-
execute(ctx: OrmSession
|
|
4367
|
+
execute(ctx: OrmSession): Promise<T[]>;
|
|
4353
4368
|
/**
|
|
4354
4369
|
* Executes the query and returns plain row objects (POJOs), ignoring any entity materialization.
|
|
4355
4370
|
* Use this if you want raw data even when using selectFromEntity.
|
|
@@ -4361,7 +4376,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4361
4376
|
* // rows is EntityInstance<UserTable>[] (plain objects)
|
|
4362
4377
|
* rows[0] instanceof User; // false
|
|
4363
4378
|
*/
|
|
4364
|
-
executePlain(ctx: OrmSession
|
|
4379
|
+
executePlain(ctx: OrmSession): Promise<EntityInstance<TTable>[]>;
|
|
4365
4380
|
/**
|
|
4366
4381
|
* Executes the query and returns results as real class instances.
|
|
4367
4382
|
* Unlike execute(), this returns actual instances of the decorated entity class
|
|
@@ -4376,14 +4391,14 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4376
4391
|
* users[0] instanceof User; // true!
|
|
4377
4392
|
* users[0].getFullName(); // works!
|
|
4378
4393
|
*/
|
|
4379
|
-
executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession
|
|
4394
|
+
executeAs<TEntity extends object>(entityClass: EntityConstructor<TEntity>, ctx: OrmSession): Promise<TEntity[]>;
|
|
4380
4395
|
/**
|
|
4381
4396
|
* Executes a count query for the current builder without LIMIT/OFFSET clauses.
|
|
4382
4397
|
*
|
|
4383
4398
|
* @example
|
|
4384
4399
|
* const total = await qb.count(session);
|
|
4385
4400
|
*/
|
|
4386
|
-
count(session: OrmSession
|
|
4401
|
+
count(session: OrmSession): Promise<number>;
|
|
4387
4402
|
/**
|
|
4388
4403
|
* Executes the query and returns both the paged items and the total.
|
|
4389
4404
|
*
|
|
@@ -4393,7 +4408,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4393
4408
|
executePaged(session: OrmSession, options: {
|
|
4394
4409
|
page: number;
|
|
4395
4410
|
pageSize: number;
|
|
4396
|
-
}
|
|
4411
|
+
}): Promise<PaginatedResult<T>>;
|
|
4397
4412
|
/**
|
|
4398
4413
|
* Executes the query with provided execution and hydration contexts
|
|
4399
4414
|
* @param execCtx - Execution context
|
|
@@ -4404,7 +4419,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4404
4419
|
* const hydCtx = new HydrationContext();
|
|
4405
4420
|
* const users = await qb.executeWithContexts(execCtx, hydCtx);
|
|
4406
4421
|
*/
|
|
4407
|
-
executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext
|
|
4422
|
+
executeWithContexts(execCtx: ExecutionContext, hydCtx: HydrationContext): Promise<T[]>;
|
|
4408
4423
|
/**
|
|
4409
4424
|
* Adds a WHERE condition to the query
|
|
4410
4425
|
* @param expr - Expression for the WHERE clause
|
|
@@ -4576,7 +4591,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4576
4591
|
* .compile('postgres');
|
|
4577
4592
|
* console.log(compiled.sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
|
|
4578
4593
|
*/
|
|
4579
|
-
compile(dialect: SelectDialectInput, options?:
|
|
4594
|
+
compile(dialect: SelectDialectInput, options?: ParamOperandCompileOptions): CompiledQuery;
|
|
4580
4595
|
/**
|
|
4581
4596
|
* Converts the query to SQL string for a specific dialect
|
|
4582
4597
|
* @param dialect - Database dialect to generate SQL for
|
|
@@ -4587,7 +4602,7 @@ declare class SelectQueryBuilder<T = EntityInstance<TableDef>, TTable extends Ta
|
|
|
4587
4602
|
* .toSql('postgres');
|
|
4588
4603
|
* console.log(sql); // SELECT "id", "name" FROM "users" WHERE "active" = true
|
|
4589
4604
|
*/
|
|
4590
|
-
toSql(dialect: SelectDialectInput, options?:
|
|
4605
|
+
toSql(dialect: SelectDialectInput, options?: ParamOperandCompileOptions): string;
|
|
4591
4606
|
/**
|
|
4592
4607
|
* Gets hydration plan for query
|
|
4593
4608
|
* @returns Hydration plan or undefined if none exists
|
|
@@ -6767,9 +6782,6 @@ declare class DefaultManyToManyCollection<TTarget, TPivot extends object | undef
|
|
|
6767
6782
|
toJSON(): TTarget[];
|
|
6768
6783
|
}
|
|
6769
6784
|
|
|
6770
|
-
type ParamOperandOptions = {
|
|
6771
|
-
allowParamOperands?: boolean;
|
|
6772
|
-
};
|
|
6773
6785
|
/**
|
|
6774
6786
|
* Executes a hydrated query using the ORM session.
|
|
6775
6787
|
* @template TTable - The table type
|
|
@@ -6777,7 +6789,7 @@ type ParamOperandOptions = {
|
|
|
6777
6789
|
* @param qb - The select query builder
|
|
6778
6790
|
* @returns Promise resolving to array of entity instances
|
|
6779
6791
|
*/
|
|
6780
|
-
declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable
|
|
6792
|
+
declare function executeHydrated<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
|
|
6781
6793
|
/**
|
|
6782
6794
|
* Executes a hydrated query and returns plain row objects (no entity proxies).
|
|
6783
6795
|
* @template TTable - The table type
|
|
@@ -6785,7 +6797,7 @@ declare function executeHydrated<TTable extends TableDef>(session: OrmSession, q
|
|
|
6785
6797
|
* @param qb - The select query builder
|
|
6786
6798
|
* @returns Promise resolving to array of plain row objects
|
|
6787
6799
|
*/
|
|
6788
|
-
declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable
|
|
6800
|
+
declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSession, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
|
|
6789
6801
|
/**
|
|
6790
6802
|
* Executes a hydrated query using execution and hydration contexts.
|
|
6791
6803
|
* @template TTable - The table type
|
|
@@ -6794,7 +6806,7 @@ declare function executeHydratedPlain<TTable extends TableDef>(session: OrmSessi
|
|
|
6794
6806
|
* @param qb - The select query builder
|
|
6795
6807
|
* @returns Promise resolving to array of entity instances
|
|
6796
6808
|
*/
|
|
6797
|
-
declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable
|
|
6809
|
+
declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, hydCtx: HydrationContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<EntityInstance<TTable>[]>;
|
|
6798
6810
|
/**
|
|
6799
6811
|
* Executes a hydrated query using execution context and returns plain row objects.
|
|
6800
6812
|
* @template TTable - The table type
|
|
@@ -6802,7 +6814,7 @@ declare function executeHydratedWithContexts<TTable extends TableDef>(execCtx: E
|
|
|
6802
6814
|
* @param qb - The select query builder
|
|
6803
6815
|
* @returns Promise resolving to array of plain row objects
|
|
6804
6816
|
*/
|
|
6805
|
-
declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable
|
|
6817
|
+
declare function executeHydratedPlainWithContexts<TTable extends TableDef>(execCtx: ExecutionContext, qb: SelectQueryBuilder<unknown, TTable>): Promise<Record<string, unknown>[]>;
|
|
6806
6818
|
|
|
6807
6819
|
type JsonifyScalar<T> = T extends Date ? string : T;
|
|
6808
6820
|
/**
|
|
@@ -7234,4 +7246,4 @@ type PooledExecutorFactoryOptions<TConn> = {
|
|
|
7234
7246
|
*/
|
|
7235
7247
|
declare function createPooledExecutorFactory<TConn>(opts: PooledExecutorFactoryOptions<TConn>): DbExecutorFactory;
|
|
7236
7248
|
|
|
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 };
|
|
7249
|
+
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 OpenApiComponents, 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 };
|