hysteria-orm 10.8.2 → 10.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +11 -11
- package/lib/cli.js.map +1 -1
- package/lib/index.cjs +12 -12
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +152 -80
- package/lib/index.d.ts +152 -80
- package/lib/index.js +12 -12
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -3282,8 +3282,8 @@ type ColumnOptions = {
|
|
|
3282
3282
|
*/
|
|
3283
3283
|
nullable?: boolean;
|
|
3284
3284
|
/**
|
|
3285
|
-
* @description The default value for the column in the database
|
|
3286
|
-
* @migration Only affects auto-generated migrations
|
|
3285
|
+
* @description The default value for the column in the database.
|
|
3286
|
+
* @migration Only affects auto-generated migrations (CREATE TABLE / ALTER TABLE). Does NOT set a default value during insert operations — use `prepare` for that.
|
|
3287
3287
|
*/
|
|
3288
3288
|
default?: string | number | null | boolean;
|
|
3289
3289
|
} &
|
|
@@ -5068,18 +5068,17 @@ declare class ModelManager<T extends Model> {
|
|
|
5068
5068
|
*/
|
|
5069
5069
|
private executeMssqlMerge;
|
|
5070
5070
|
/**
|
|
5071
|
-
* @description Updates a record, returns the updated record
|
|
5072
|
-
* @description Model is retrieved from the database using the primary key regardless of any model hooks
|
|
5071
|
+
* @description Updates a record. When returning is provided, re-fetches and returns the updated record; otherwise returns void.
|
|
5073
5072
|
* @description Can only be used if the model has a primary key, use a massive update if the model has no primary key
|
|
5074
5073
|
*/
|
|
5075
|
-
updateRecord(
|
|
5074
|
+
updateRecord(pk: string | number, data: Partial<T>, options?: {
|
|
5076
5075
|
returning?: ModelKey<T>[];
|
|
5077
|
-
}): Promise<ModelWithoutRelations<T
|
|
5076
|
+
}): Promise<ModelWithoutRelations<T> | void>;
|
|
5078
5077
|
/**
|
|
5079
5078
|
* @description Deletes a record
|
|
5080
5079
|
* @description Can only be used if the model has a primary key, use a massive delete if the model has no primary key
|
|
5081
5080
|
*/
|
|
5082
|
-
deleteRecord(
|
|
5081
|
+
deleteRecord(pk: string | number): Promise<void>;
|
|
5083
5082
|
/**
|
|
5084
5083
|
* @description Returns a query builder instance
|
|
5085
5084
|
*/
|
|
@@ -5687,23 +5686,24 @@ type ModelWithoutRelations<T extends Model> = Pick<Omit<T, "*">, ExcludeRelation
|
|
|
5687
5686
|
* This type is used as the return type for:
|
|
5688
5687
|
* - Static find methods: find, findOne, findOneOrFail, findBy, findOneBy, findOneByPrimaryKey
|
|
5689
5688
|
* - Static retrieval methods: all, first
|
|
5690
|
-
* - Static mutation methods: insert, insertMany, upsert, upsertMany, updateRecord, softDelete
|
|
5689
|
+
* - Static mutation methods: insert, insertMany, upsert, upsertMany, updateRecord, softDelete, save
|
|
5691
5690
|
* - Static refresh method: refresh
|
|
5692
5691
|
*
|
|
5693
5692
|
* @example
|
|
5694
5693
|
* ```typescript
|
|
5695
|
-
* //
|
|
5694
|
+
* // Find methods return ModelQueryResult<User> (or arrays/nullables thereof)
|
|
5696
5695
|
* const user1 = await User.findOne({ where: { id: 1 } });
|
|
5697
|
-
* const user2 = await User.findOneOrFail({ where: { id: 1 } });
|
|
5698
5696
|
* const users = await User.find({});
|
|
5699
|
-
* const allUsers = await User.all();
|
|
5700
|
-
* const newUser = await User.insert({ name: "John" });
|
|
5701
5697
|
*
|
|
5702
|
-
* //
|
|
5698
|
+
* // Mutation methods return void by default; use returning for data
|
|
5699
|
+
* await User.insert({ name: "John" }); // void
|
|
5700
|
+
* const newUser = await User.insert({ name: "John" }, { returning: ["*"] }); // User
|
|
5701
|
+
*
|
|
5703
5702
|
* if (user1) {
|
|
5704
|
-
* await User.updateRecord(user1, { name: "Jane" });
|
|
5705
|
-
* await User.
|
|
5706
|
-
* await User.
|
|
5703
|
+
* await User.updateRecord(user1.id, { name: "Jane" }); // void
|
|
5704
|
+
* const updated = await User.updateRecord(user1.id, { name: "Jane" }, { returning: ["*"] }); // User
|
|
5705
|
+
* const refreshed = await User.refresh(user1.id);
|
|
5706
|
+
* await User.deleteRecord(user1.id);
|
|
5707
5707
|
* }
|
|
5708
5708
|
* ```
|
|
5709
5709
|
*/
|
|
@@ -6240,9 +6240,12 @@ declare abstract class Model<T extends Model<T> = any> extends Entity {
|
|
|
6240
6240
|
*/
|
|
6241
6241
|
static findOneByPrimaryKey<T extends Model, S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(this: new () => T | typeof Model, value: string | number, options?: Omit<BaseModelMethodOptions, "ignoreHooks">): Promise<FindReturnType<T, S, R> | null>;
|
|
6242
6242
|
/**
|
|
6243
|
-
* @description
|
|
6243
|
+
* @description Retrieves a fresh copy of a record from the database by primary key
|
|
6244
|
+
* @param pk The primary key value of the record to refresh
|
|
6245
|
+
* @param options Optional transaction/connection options
|
|
6246
|
+
* @returns The refreshed model data or null if not found
|
|
6244
6247
|
*/
|
|
6245
|
-
static refresh<T extends Model>(this: new () => T | typeof Model,
|
|
6248
|
+
static refresh<T extends Model>(this: new () => T | typeof Model, pk: string | number, options?: Omit<BaseModelMethodOptions, "ignoreHooks">): Promise<ModelQueryResult<T> | null>;
|
|
6246
6249
|
/**
|
|
6247
6250
|
* @description Saves a new record to the database
|
|
6248
6251
|
* @warning If not using postgres and the model has no primary key, the model will be saved, but it won't be possible to retrieve it so at that point it will be returned as null, this is not typed as Model | null for type safety reasons
|
|
@@ -6286,12 +6289,17 @@ declare abstract class Model<T extends Model<T> = any> extends Entity {
|
|
|
6286
6289
|
caseConvention?: CaseConvention;
|
|
6287
6290
|
}): Promise<void>;
|
|
6288
6291
|
/**
|
|
6289
|
-
* @description Updates a record, returns the
|
|
6290
|
-
* @description Model is retrieved from the database using the primary key regardless of any model hooks
|
|
6292
|
+
* @description Updates a record by primary key. By default returns void; when returning is provided, re-fetches and returns the specified columns.
|
|
6291
6293
|
* @description Can only be used if the model has a primary key, use a massive update if the model has no primary key
|
|
6294
|
+
* @param pk The primary key value of the record to update
|
|
6295
|
+
* @param updatePayload The partial data to update
|
|
6296
|
+
* @param options Optional transaction/connection options and returning columns
|
|
6297
|
+
* @typeParam R - The returning columns (literal tuple for type inference). Defaults to void.
|
|
6292
6298
|
* @throws {HysteriaError} If the model has no primary key
|
|
6293
6299
|
*/
|
|
6294
|
-
static updateRecord<T extends Model>(this: new () => T | typeof Model,
|
|
6300
|
+
static updateRecord<T extends Model, const R extends ReturningColumns<T> = undefined>(this: new () => T | typeof Model, pk: string | number, updatePayload: Partial<ModelWithoutRelations<T>>, options?: Omit<BaseModelMethodOptions, "ignoreHooks"> & {
|
|
6301
|
+
returning?: R;
|
|
6302
|
+
}): Promise<WriteReturnType<T, R>>;
|
|
6295
6303
|
/**
|
|
6296
6304
|
* @description Finds the first record or creates a new one if it doesn't exist
|
|
6297
6305
|
*/
|
|
@@ -6317,28 +6325,39 @@ declare abstract class Model<T extends Model<T> = any> extends Entity {
|
|
|
6317
6325
|
returning?: R;
|
|
6318
6326
|
}): Promise<WriteReturnType<T, R>[]>;
|
|
6319
6327
|
/**
|
|
6320
|
-
* @description Deletes a record
|
|
6328
|
+
* @description Deletes a record from the database by primary key
|
|
6329
|
+
* @param pk The primary key value of the record to delete
|
|
6330
|
+
* @param options Optional transaction/connection options
|
|
6331
|
+
* @throws {HysteriaError} If the model has no primary key
|
|
6321
6332
|
*/
|
|
6322
|
-
static deleteRecord<T extends Model>(this: new () => T | typeof Model,
|
|
6333
|
+
static deleteRecord<T extends Model>(this: new () => T | typeof Model, pk: string | number, options?: Omit<BaseModelMethodOptions, "ignoreHooks">): Promise<void>;
|
|
6323
6334
|
/**
|
|
6324
|
-
* @description Saves (inserts or updates)
|
|
6325
|
-
* @description If the primary key is
|
|
6326
|
-
* @
|
|
6327
|
-
* @param
|
|
6328
|
-
* @
|
|
6335
|
+
* @description Saves (inserts or updates) model data to the database. By default returns void; when returning is provided, returns the specified columns.
|
|
6336
|
+
* @description If the primary key is present in the data, performs an update. If not, performs an insert.
|
|
6337
|
+
* @param modelData The data to save
|
|
6338
|
+
* @param options Optional transaction, connection options and returning columns
|
|
6339
|
+
* @typeParam R - The returning columns (literal tuple for type inference). Defaults to void.
|
|
6329
6340
|
* @throws {HysteriaError} If the model has no primary key defined
|
|
6330
6341
|
*/
|
|
6331
|
-
static save<T extends Model>(this: new () => T | typeof Model,
|
|
6342
|
+
static save<T extends Model, const R extends ReturningColumns<T> = undefined>(this: new () => T | typeof Model, modelData: Partial<ModelWithoutRelations<T>>, options?: Omit<BaseModelMethodOptions, "ignoreHooks"> & {
|
|
6343
|
+
returning?: R;
|
|
6344
|
+
}): Promise<WriteReturnType<T, R>>;
|
|
6332
6345
|
/**
|
|
6333
|
-
* @description Soft Deletes a record
|
|
6346
|
+
* @description Soft Deletes a record by primary key. By default returns void; when returning is provided, returns the specified columns.
|
|
6334
6347
|
* @description default column: deletedAt
|
|
6335
6348
|
* @description default value: The current date and time in UTC timezone in the format "YYYY-MM-DD HH:mm:ss"
|
|
6336
6349
|
* @description You can override the column and value by providing the column and value on the static properties of the model `softDeleteColumn` and `softDeleteValue`
|
|
6350
|
+
* @param pk The primary key value of the record to soft delete
|
|
6351
|
+
* @param softDeleteOptions Optional column and value overrides
|
|
6352
|
+
* @param options Optional transaction/connection options and returning columns
|
|
6353
|
+
* @typeParam R - The returning columns (literal tuple for type inference). Defaults to void.
|
|
6337
6354
|
*/
|
|
6338
|
-
static softDelete<T extends Model>(this: new () => T | typeof Model,
|
|
6355
|
+
static softDelete<T extends Model, const R extends ReturningColumns<T> = undefined>(this: new () => T | typeof Model, pk: string | number, softDeleteOptions?: {
|
|
6339
6356
|
column?: ModelKey<T>;
|
|
6340
6357
|
value?: string | number | boolean | Date;
|
|
6341
|
-
}, options?: Omit<BaseModelMethodOptions, "ignoreHooks">
|
|
6358
|
+
}, options?: Omit<BaseModelMethodOptions, "ignoreHooks"> & {
|
|
6359
|
+
returning?: R;
|
|
6360
|
+
}): Promise<WriteReturnType<T, R>>;
|
|
6342
6361
|
/**
|
|
6343
6362
|
* @description Truncates the table for the given model
|
|
6344
6363
|
*/
|
|
@@ -6535,8 +6554,17 @@ declare abstract class Model<T extends Model<T> = any> extends Entity {
|
|
|
6535
6554
|
*/
|
|
6536
6555
|
interface ColumnDef<T = unknown> {
|
|
6537
6556
|
readonly _phantom: T;
|
|
6557
|
+
readonly _isPrimary?: boolean;
|
|
6538
6558
|
readonly _apply: (target: Object, propertyKey: string) => void;
|
|
6539
6559
|
}
|
|
6560
|
+
/**
|
|
6561
|
+
* A column descriptor marked as a primary key.
|
|
6562
|
+
* Used by `col.primary()`, `col.increment()`, and `col.bigIncrement()` to
|
|
6563
|
+
* carry PK type information for `defineModel` type inference.
|
|
6564
|
+
*/
|
|
6565
|
+
interface PrimaryColumnDef<T = unknown> extends ColumnDef<T> {
|
|
6566
|
+
readonly _isPrimary: true;
|
|
6567
|
+
}
|
|
6540
6568
|
/**
|
|
6541
6569
|
* Phantom-typed descriptor for a model relation.
|
|
6542
6570
|
* `T` carries the TypeScript type the relation resolves to at the instance level.
|
|
@@ -6545,31 +6573,31 @@ interface RelationDef<T = any> {
|
|
|
6545
6573
|
readonly _phantom: T;
|
|
6546
6574
|
readonly _apply: (target: Object, propertyKey: string) => void;
|
|
6547
6575
|
}
|
|
6548
|
-
type ColOptions = Omit<ColumnOptions, "primaryKey" | "serialize" | "prepare">;
|
|
6549
|
-
type ColPrimaryOptions = Omit<ColumnOptions, "primaryKey" | "serialize" | "prepare">;
|
|
6550
|
-
type ColStringOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare"> & {
|
|
6576
|
+
type ColOptions = Omit<ColumnOptions, "primaryKey" | "serialize" | "prepare" | "default">;
|
|
6577
|
+
type ColPrimaryOptions = Omit<ColumnOptions, "primaryKey" | "serialize" | "prepare" | "default">;
|
|
6578
|
+
type ColStringOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare" | "default"> & {
|
|
6551
6579
|
length?: number;
|
|
6552
6580
|
};
|
|
6553
|
-
type ColTextOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare">;
|
|
6554
|
-
type ColIntegerOptions = Omit<ColumnOptions, "serialize" | "prepare">;
|
|
6555
|
-
type ColBigIntegerOptions = Omit<ColumnOptions, "serialize" | "prepare">;
|
|
6556
|
-
type ColFloatOptions = Omit<ColumnOptions, "serialize" | "prepare">;
|
|
6557
|
-
type ColDecimalOptions = Omit<ColumnOptions, "serialize" | "prepare"> & {
|
|
6581
|
+
type ColTextOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare" | "default">;
|
|
6582
|
+
type ColIntegerOptions = Omit<ColumnOptions, "serialize" | "prepare" | "default">;
|
|
6583
|
+
type ColBigIntegerOptions = Omit<ColumnOptions, "serialize" | "prepare" | "default">;
|
|
6584
|
+
type ColFloatOptions = Omit<ColumnOptions, "serialize" | "prepare" | "default">;
|
|
6585
|
+
type ColDecimalOptions = Omit<ColumnOptions, "serialize" | "prepare" | "default"> & {
|
|
6558
6586
|
precision?: number;
|
|
6559
6587
|
scale?: number;
|
|
6560
6588
|
};
|
|
6561
|
-
type ColIncrementOptions = Omit<ColumnOptions, "serialize" | "prepare" | "primaryKey" | "nullable">;
|
|
6562
|
-
type ColBigIncrementOptions = Omit<ColumnOptions, "serialize" | "prepare" | "primaryKey" | "nullable">;
|
|
6563
|
-
type ColBooleanOptions = Omit<ColumnOptions, "prepare" | "serialize">;
|
|
6564
|
-
type ColDateOptions = Omit<DateColumnOptions, "format" | "serialize" | "prepare">;
|
|
6565
|
-
type ColDatetimeOptions = Omit<DatetimeColumnOptions, "serialize" | "prepare">;
|
|
6566
|
-
type ColTimestampOptions = Omit<DatetimeColumnOptions, "serialize" | "prepare">;
|
|
6567
|
-
type ColTimeOptions = Omit<DateColumnOptions, "format" | "serialize" | "prepare">;
|
|
6568
|
-
type ColJsonOptions = Omit<ColumnOptions, "prepare" | "serialize">;
|
|
6569
|
-
type ColUuidOptions = Omit<ColumnOptions, "prepare" | "serialize">;
|
|
6570
|
-
type ColUlidOptions = Omit<ColumnOptions, "prepare" | "serialize">;
|
|
6571
|
-
type ColBinaryOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare">;
|
|
6572
|
-
type ColEnumOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare">;
|
|
6589
|
+
type ColIncrementOptions = Omit<ColumnOptions, "serialize" | "prepare" | "primaryKey" | "nullable" | "default">;
|
|
6590
|
+
type ColBigIncrementOptions = Omit<ColumnOptions, "serialize" | "prepare" | "primaryKey" | "nullable" | "default">;
|
|
6591
|
+
type ColBooleanOptions = Omit<ColumnOptions, "prepare" | "serialize" | "default">;
|
|
6592
|
+
type ColDateOptions = Omit<DateColumnOptions, "format" | "serialize" | "prepare" | "default">;
|
|
6593
|
+
type ColDatetimeOptions = Omit<DatetimeColumnOptions, "serialize" | "prepare" | "default">;
|
|
6594
|
+
type ColTimestampOptions = Omit<DatetimeColumnOptions, "serialize" | "prepare" | "default">;
|
|
6595
|
+
type ColTimeOptions = Omit<DateColumnOptions, "format" | "serialize" | "prepare" | "default">;
|
|
6596
|
+
type ColJsonOptions = Omit<ColumnOptions, "prepare" | "serialize" | "default">;
|
|
6597
|
+
type ColUuidOptions = Omit<ColumnOptions, "prepare" | "serialize" | "default">;
|
|
6598
|
+
type ColUlidOptions = Omit<ColumnOptions, "prepare" | "serialize" | "default">;
|
|
6599
|
+
type ColBinaryOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare" | "default">;
|
|
6600
|
+
type ColEnumOptions = Omit<ColumnOptions, "type" | "serialize" | "prepare" | "default">;
|
|
6573
6601
|
type ColSymmetricOptions = Omit<SymmetricEncryptionOptions, "prepare" | "serialize">;
|
|
6574
6602
|
type ColAsymmetricOptions = Omit<AsymmetricEncryptionOptions, "prepare" | "serialize">;
|
|
6575
6603
|
type RelationConstraintOptions = {
|
|
@@ -6603,6 +6631,14 @@ type TypedSerialize<T> = {
|
|
|
6603
6631
|
type TypedPrepare<T> = {
|
|
6604
6632
|
prepare?: (value: T) => any;
|
|
6605
6633
|
};
|
|
6634
|
+
type TypedDefault<T> = {
|
|
6635
|
+
/**
|
|
6636
|
+
* Narrows the `default` property to the column's base type.
|
|
6637
|
+
* @migration Migration-only metadata. Sets the DEFAULT clause in CREATE TABLE / ALTER TABLE.
|
|
6638
|
+
* Does **not** enforce a value during `insert()` — pass the value explicitly or use `prepare`.
|
|
6639
|
+
*/
|
|
6640
|
+
default?: T | null;
|
|
6641
|
+
};
|
|
6606
6642
|
interface ColNamespace {
|
|
6607
6643
|
/**
|
|
6608
6644
|
* Generic column — you control the TypeScript type via `col<T>()`.
|
|
@@ -6615,7 +6651,7 @@ interface ColNamespace {
|
|
|
6615
6651
|
* col<MyCustomType>({ serialize: (raw) => parse(raw), prepare: (v) => stringify(v) })
|
|
6616
6652
|
* ```
|
|
6617
6653
|
*/
|
|
6618
|
-
<T = unknown>(options?: ColOptions & TypedSerialize<T> & TypedPrepare<T>): ColumnDef<T>;
|
|
6654
|
+
<T = unknown>(options?: ColOptions & TypedSerialize<T> & TypedPrepare<T> & TypedDefault<T>): ColumnDef<T>;
|
|
6619
6655
|
/**
|
|
6620
6656
|
* Generic primary key column. Defaults to `string | number`.
|
|
6621
6657
|
* Override the generic when you know the exact type.
|
|
@@ -6624,7 +6660,7 @@ interface ColNamespace {
|
|
|
6624
6660
|
* col.primary<number>({ nullable: false })
|
|
6625
6661
|
* ```
|
|
6626
6662
|
*/
|
|
6627
|
-
primary<T = string | number>(options?: ColPrimaryOptions & TypedSerialize<T> & TypedPrepare<T>):
|
|
6663
|
+
primary<T = string | number>(options?: ColPrimaryOptions & TypedSerialize<T> & TypedPrepare<T> & TypedDefault<T>): PrimaryColumnDef<T>;
|
|
6628
6664
|
/**
|
|
6629
6665
|
* VARCHAR column. Accepts an optional `length` option.
|
|
6630
6666
|
* Type: `string` (nullable-aware).
|
|
@@ -6634,27 +6670,27 @@ interface ColNamespace {
|
|
|
6634
6670
|
* col.string() // string | null | undefined
|
|
6635
6671
|
* ```
|
|
6636
6672
|
*/
|
|
6637
|
-
string<O extends ColStringOptions = ColStringOptions>(options?: O & TypedSerialize<NullableColumn<string, O>> & TypedPrepare<NullableColumn<string, O>>): ColumnDef<NullableColumn<string, O>>;
|
|
6673
|
+
string<O extends ColStringOptions = ColStringOptions>(options?: O & TypedSerialize<NullableColumn<string, O>> & TypedPrepare<NullableColumn<string, O>> & TypedDefault<string>): ColumnDef<NullableColumn<string, O>>;
|
|
6638
6674
|
/**
|
|
6639
6675
|
* LONGTEXT column for large text content.
|
|
6640
6676
|
* Type: `string` (nullable-aware).
|
|
6641
6677
|
*/
|
|
6642
|
-
text<O extends ColTextOptions = ColTextOptions>(options?: O & TypedSerialize<NullableColumn<string, O>> & TypedPrepare<NullableColumn<string, O>>): ColumnDef<NullableColumn<string, O>>;
|
|
6678
|
+
text<O extends ColTextOptions = ColTextOptions>(options?: O & TypedSerialize<NullableColumn<string, O>> & TypedPrepare<NullableColumn<string, O>> & TypedDefault<string>): ColumnDef<NullableColumn<string, O>>;
|
|
6643
6679
|
/**
|
|
6644
6680
|
* Integer column.
|
|
6645
6681
|
* Type: `number` (nullable-aware). Only `prepare` is exposed (no `serialize`).
|
|
6646
6682
|
*/
|
|
6647
|
-
integer<O extends ColIntegerOptions = ColIntegerOptions>(options?: O & TypedPrepare<NullableColumn<number, O>>): ColumnDef<NullableColumn<number, O>>;
|
|
6683
|
+
integer<O extends ColIntegerOptions = ColIntegerOptions>(options?: O & TypedPrepare<NullableColumn<number, O>> & TypedDefault<number>): ColumnDef<NullableColumn<number, O>>;
|
|
6648
6684
|
/**
|
|
6649
6685
|
* Big integer column for values exceeding 32-bit range.
|
|
6650
6686
|
* Type: `number` (nullable-aware). Only `prepare` is exposed.
|
|
6651
6687
|
*/
|
|
6652
|
-
bigInteger<O extends ColBigIntegerOptions = ColBigIntegerOptions>(options?: O & TypedPrepare<NullableColumn<number, O>>): ColumnDef<NullableColumn<number, O>>;
|
|
6688
|
+
bigInteger<O extends ColBigIntegerOptions = ColBigIntegerOptions>(options?: O & TypedPrepare<NullableColumn<number, O>> & TypedDefault<number>): ColumnDef<NullableColumn<number, O>>;
|
|
6653
6689
|
/**
|
|
6654
6690
|
* Floating-point column.
|
|
6655
6691
|
* Type: `number` (nullable-aware). Only `prepare` is exposed.
|
|
6656
6692
|
*/
|
|
6657
|
-
float<O extends ColFloatOptions = ColFloatOptions>(options?: O & TypedPrepare<NullableColumn<number, O>>): ColumnDef<NullableColumn<number, O>>;
|
|
6693
|
+
float<O extends ColFloatOptions = ColFloatOptions>(options?: O & TypedPrepare<NullableColumn<number, O>> & TypedDefault<number>): ColumnDef<NullableColumn<number, O>>;
|
|
6658
6694
|
/**
|
|
6659
6695
|
* Decimal column with optional `precision` and `scale`.
|
|
6660
6696
|
* Type: `number` (nullable-aware). Only `prepare` is exposed.
|
|
@@ -6663,22 +6699,22 @@ interface ColNamespace {
|
|
|
6663
6699
|
* col.decimal({ precision: 10, scale: 2, nullable: false }) // number
|
|
6664
6700
|
* ```
|
|
6665
6701
|
*/
|
|
6666
|
-
decimal<O extends ColDecimalOptions = ColDecimalOptions>(options?: O & TypedPrepare<NullableColumn<number, O>>): ColumnDef<NullableColumn<number, O>>;
|
|
6702
|
+
decimal<O extends ColDecimalOptions = ColDecimalOptions>(options?: O & TypedPrepare<NullableColumn<number, O>> & TypedDefault<number>): ColumnDef<NullableColumn<number, O>>;
|
|
6667
6703
|
/**
|
|
6668
6704
|
* Auto-incrementing integer primary key. Always non-nullable.
|
|
6669
6705
|
* Type: `number`. Only `prepare` is exposed.
|
|
6670
6706
|
*/
|
|
6671
|
-
increment(options?: ColIncrementOptions & TypedPrepare<number>):
|
|
6707
|
+
increment(options?: ColIncrementOptions & TypedPrepare<number> & TypedDefault<number>): PrimaryColumnDef<number>;
|
|
6672
6708
|
/**
|
|
6673
6709
|
* Auto-incrementing bigint primary key. Always non-nullable.
|
|
6674
6710
|
* Type: `number`. Only `prepare` is exposed.
|
|
6675
6711
|
*/
|
|
6676
|
-
bigIncrement(options?: ColBigIncrementOptions & TypedPrepare<number>):
|
|
6712
|
+
bigIncrement(options?: ColBigIncrementOptions & TypedPrepare<number> & TypedDefault<number>): PrimaryColumnDef<number>;
|
|
6677
6713
|
/**
|
|
6678
6714
|
* Boolean column.
|
|
6679
6715
|
* Type: `boolean` (nullable-aware). No `serialize` or `prepare` exposed.
|
|
6680
6716
|
*/
|
|
6681
|
-
boolean<O extends ColBooleanOptions = ColBooleanOptions>(options?: O): ColumnDef<NullableColumn<boolean, O>>;
|
|
6717
|
+
boolean<O extends ColBooleanOptions = ColBooleanOptions>(options?: O & TypedDefault<boolean>): ColumnDef<NullableColumn<boolean, O>>;
|
|
6682
6718
|
/**
|
|
6683
6719
|
* DATE column (YYYY-MM-DD). Defaults to `Date` because database drivers
|
|
6684
6720
|
* return `Date` objects.
|
|
@@ -6692,8 +6728,8 @@ interface ColNamespace {
|
|
|
6692
6728
|
*/
|
|
6693
6729
|
date<T extends Date | string = Date>(options: ColDateOptions & {
|
|
6694
6730
|
nullable: false;
|
|
6695
|
-
} & TypedSerialize<T> & TypedPrepare<T>): ColumnDef<T>;
|
|
6696
|
-
date<T extends Date | string = Date>(options?: ColDateOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined>): ColumnDef<T | null | undefined>;
|
|
6731
|
+
} & TypedSerialize<T> & TypedPrepare<T> & TypedDefault<string>): ColumnDef<T>;
|
|
6732
|
+
date<T extends Date | string = Date>(options?: ColDateOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined> & TypedDefault<string>): ColumnDef<T | null | undefined>;
|
|
6697
6733
|
/**
|
|
6698
6734
|
* DATETIME column. Defaults to `Date` because database drivers return
|
|
6699
6735
|
* `Date` objects.
|
|
@@ -6707,8 +6743,8 @@ interface ColNamespace {
|
|
|
6707
6743
|
*/
|
|
6708
6744
|
datetime<T extends Date | string = Date>(options: ColDatetimeOptions & {
|
|
6709
6745
|
nullable: false;
|
|
6710
|
-
} & TypedSerialize<T> & TypedPrepare<T>): ColumnDef<T>;
|
|
6711
|
-
datetime<T extends Date | string = Date>(options?: ColDatetimeOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined>): ColumnDef<T | null | undefined>;
|
|
6746
|
+
} & TypedSerialize<T> & TypedPrepare<T> & TypedDefault<string>): ColumnDef<T>;
|
|
6747
|
+
datetime<T extends Date | string = Date>(options?: ColDatetimeOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined> & TypedDefault<string>): ColumnDef<T | null | undefined>;
|
|
6712
6748
|
/**
|
|
6713
6749
|
* TIMESTAMP column. Defaults to `Date` because database drivers return
|
|
6714
6750
|
* `Date` objects.
|
|
@@ -6722,8 +6758,8 @@ interface ColNamespace {
|
|
|
6722
6758
|
*/
|
|
6723
6759
|
timestamp<T extends Date | string = Date>(options: ColTimestampOptions & {
|
|
6724
6760
|
nullable: false;
|
|
6725
|
-
} & TypedSerialize<T> & TypedPrepare<T>): ColumnDef<T>;
|
|
6726
|
-
timestamp<T extends Date | string = Date>(options?: ColTimestampOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined>): ColumnDef<T | null | undefined>;
|
|
6761
|
+
} & TypedSerialize<T> & TypedPrepare<T> & TypedDefault<string>): ColumnDef<T>;
|
|
6762
|
+
timestamp<T extends Date | string = Date>(options?: ColTimestampOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined> & TypedDefault<string>): ColumnDef<T | null | undefined>;
|
|
6727
6763
|
/**
|
|
6728
6764
|
* TIME column. Defaults to `Date` because database drivers return
|
|
6729
6765
|
* `Date` objects.
|
|
@@ -6737,8 +6773,8 @@ interface ColNamespace {
|
|
|
6737
6773
|
*/
|
|
6738
6774
|
time<T extends Date | string = Date>(options: ColTimeOptions & {
|
|
6739
6775
|
nullable: false;
|
|
6740
|
-
} & TypedSerialize<T> & TypedPrepare<T>): ColumnDef<T>;
|
|
6741
|
-
time<T extends Date | string = Date>(options?: ColTimeOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined>): ColumnDef<T | null | undefined>;
|
|
6776
|
+
} & TypedSerialize<T> & TypedPrepare<T> & TypedDefault<string>): ColumnDef<T>;
|
|
6777
|
+
time<T extends Date | string = Date>(options?: ColTimeOptions & TypedSerialize<T | null | undefined> & TypedPrepare<T | null | undefined> & TypedDefault<string>): ColumnDef<T | null | undefined>;
|
|
6742
6778
|
/**
|
|
6743
6779
|
* JSON/JSONB column. Defaults to `unknown`.
|
|
6744
6780
|
* Pass a concrete type for structured JSON data: `col.json<MyType>()`.
|
|
@@ -6752,24 +6788,24 @@ interface ColNamespace {
|
|
|
6752
6788
|
*/
|
|
6753
6789
|
json<T = unknown>(options: ColJsonOptions & {
|
|
6754
6790
|
nullable: false;
|
|
6755
|
-
}): ColumnDef<T>;
|
|
6756
|
-
json<T = unknown>(options?: ColJsonOptions): ColumnDef<T | null | undefined>;
|
|
6791
|
+
} & TypedDefault<string>): ColumnDef<T>;
|
|
6792
|
+
json<T = unknown>(options?: ColJsonOptions & TypedDefault<string>): ColumnDef<T | null | undefined>;
|
|
6757
6793
|
/**
|
|
6758
6794
|
* UUID column. Auto-generates a UUID if no value is provided on insert.
|
|
6759
6795
|
* Type: `string` (nullable-aware). Only `serialize` is exposed.
|
|
6760
6796
|
*/
|
|
6761
|
-
uuid<O extends ColUuidOptions = ColUuidOptions>(options?: O & TypedSerialize<NullableColumn<string, O>>): ColumnDef<NullableColumn<string, O>>;
|
|
6797
|
+
uuid<O extends ColUuidOptions = ColUuidOptions>(options?: O & TypedSerialize<NullableColumn<string, O>> & TypedDefault<string>): ColumnDef<NullableColumn<string, O>>;
|
|
6762
6798
|
/**
|
|
6763
6799
|
* ULID column. Auto-generates a ULID if no value is provided on insert.
|
|
6764
6800
|
* Type: `string` (nullable-aware). Only `serialize` is exposed.
|
|
6765
6801
|
*/
|
|
6766
|
-
ulid<O extends ColUlidOptions = ColUlidOptions>(options?: O & TypedSerialize<NullableColumn<string, O>>): ColumnDef<NullableColumn<string, O>>;
|
|
6802
|
+
ulid<O extends ColUlidOptions = ColUlidOptions>(options?: O & TypedSerialize<NullableColumn<string, O>> & TypedDefault<string>): ColumnDef<NullableColumn<string, O>>;
|
|
6767
6803
|
/**
|
|
6768
6804
|
* Binary/blob column.
|
|
6769
6805
|
* Type: `Buffer | Uint8Array | string` (nullable-aware).
|
|
6770
6806
|
* Supports typed `serialize` and `prepare`.
|
|
6771
6807
|
*/
|
|
6772
|
-
binary<T extends Buffer | Uint8Array | string = Buffer | Uint8Array | string, O extends ColBinaryOptions = ColBinaryOptions>(options?: O & TypedSerialize<NullableColumn<T, O>> & TypedPrepare<NullableColumn<T, O>>): ColumnDef<NullableColumn<T, O>>;
|
|
6808
|
+
binary<T extends Buffer | Uint8Array | string = Buffer | Uint8Array | string, O extends ColBinaryOptions = ColBinaryOptions>(options?: O & TypedSerialize<NullableColumn<T, O>> & TypedPrepare<NullableColumn<T, O>> & TypedDefault<string>): ColumnDef<NullableColumn<T, O>>;
|
|
6773
6809
|
/**
|
|
6774
6810
|
* Enum column constrained to the given values array.
|
|
6775
6811
|
* Type: `values[number]` (nullable-aware).
|
|
@@ -6779,7 +6815,7 @@ interface ColNamespace {
|
|
|
6779
6815
|
* col.enum(["active", "inactive"] as const, { nullable: false }) // "active" | "inactive"
|
|
6780
6816
|
* ```
|
|
6781
6817
|
*/
|
|
6782
|
-
enum<const V extends readonly string[], O extends ColEnumOptions = ColEnumOptions>(values: V, options?: O & TypedSerialize<NullableColumn<V[number], O>> & TypedPrepare<NullableColumn<V[number], O>>): ColumnDef<NullableColumn<V[number], O>>;
|
|
6818
|
+
enum<const V extends readonly string[], O extends ColEnumOptions = ColEnumOptions>(values: V, options?: O & TypedSerialize<NullableColumn<V[number], O>> & TypedPrepare<NullableColumn<V[number], O>> & TypedDefault<V[number]>): ColumnDef<NullableColumn<V[number], O>>;
|
|
6783
6819
|
/** Encryption column helpers. */
|
|
6784
6820
|
encryption: {
|
|
6785
6821
|
/**
|
|
@@ -6949,6 +6985,17 @@ type DefineModelOptions<K extends string = string> = {
|
|
|
6949
6985
|
softDeleteColumn?: K;
|
|
6950
6986
|
softDeleteValue?: boolean | string;
|
|
6951
6987
|
};
|
|
6988
|
+
/**
|
|
6989
|
+
* Extracts the primary key column type from a columns definition.
|
|
6990
|
+
* Looks for columns defined with `PrimaryColumnDef` (col.primary, col.increment, col.bigIncrement).
|
|
6991
|
+
* Falls back to `string | number` if no PK column is found.
|
|
6992
|
+
*/
|
|
6993
|
+
type ExtractPKType<C extends Record<string, ColumnDef>> = {
|
|
6994
|
+
[K in keyof C]: C[K] extends PrimaryColumnDef<infer T> ? T : never;
|
|
6995
|
+
}[keyof C];
|
|
6996
|
+
type InferPK<C extends Record<string, ColumnDef>> = [
|
|
6997
|
+
ExtractPKType<C>
|
|
6998
|
+
] extends [never] ? string | number : ExtractPKType<C>;
|
|
6952
6999
|
type InferColumns<C extends Record<string, ColumnDef>> = {
|
|
6953
7000
|
[K in keyof C]: C[K] extends ColumnDef<infer T> ? T : never;
|
|
6954
7001
|
};
|
|
@@ -6982,6 +7029,11 @@ type ModelDefinition<C extends Record<string, ColumnDef> = Record<string, Column
|
|
|
6982
7029
|
type ConcreteModelStatics = {
|
|
6983
7030
|
[K in keyof typeof Model]: (typeof Model)[K];
|
|
6984
7031
|
};
|
|
7032
|
+
/**
|
|
7033
|
+
* Static methods that may have narrowed PK types in DefinedModel.
|
|
7034
|
+
* Excluded from structural checks in AnyModelConstructor.
|
|
7035
|
+
*/
|
|
7036
|
+
type PKNarrowedMethods = "updateRecord" | "deleteRecord" | "softDelete" | "save" | "refresh";
|
|
6985
7037
|
/**
|
|
6986
7038
|
* Union type that accepts both decorator-based model classes (`typeof Model`
|
|
6987
7039
|
* subclasses) and programmatic models created via `defineModel`.
|
|
@@ -6989,7 +7041,7 @@ type ConcreteModelStatics = {
|
|
|
6989
7041
|
* Use this instead of `typeof Model` in any user-facing API that should
|
|
6990
7042
|
* accept either kind of model.
|
|
6991
7043
|
*/
|
|
6992
|
-
type AnyModelConstructor = typeof Model | (ConcreteModelStatics & (new (...args: any[]) => Model));
|
|
7044
|
+
type AnyModelConstructor = typeof Model | (Omit<ConcreteModelStatics, PKNarrowedMethods> & (new (...args: any[]) => Model));
|
|
6993
7045
|
/**
|
|
6994
7046
|
* The return type of `defineModel` – a concrete Model constructor whose
|
|
6995
7047
|
* instances carry the inferred column + relation properties.
|
|
@@ -6997,7 +7049,27 @@ type AnyModelConstructor = typeof Model | (ConcreteModelStatics & (new (...args:
|
|
|
6997
7049
|
* Uses a mapped type over `typeof Model` so the abstract flag is stripped,
|
|
6998
7050
|
* making the result instantiable while keeping all public static members.
|
|
6999
7051
|
*/
|
|
7000
|
-
|
|
7052
|
+
/**
|
|
7053
|
+
* Overrides for static methods that accept a primary key parameter.
|
|
7054
|
+
* Narrows the PK type from `string | number` to the actual inferred PK type.
|
|
7055
|
+
*/
|
|
7056
|
+
type DefinedModelPKOverrides<C extends Record<string, ColumnDef>, M extends Model> = {
|
|
7057
|
+
updateRecord<const R extends ReturningColumns<M> = undefined>(pk: InferPK<C>, updatePayload: Partial<ModelWithoutRelations<M>>, options?: Omit<BaseModelMethodOptions, "ignoreHooks"> & {
|
|
7058
|
+
returning?: R;
|
|
7059
|
+
}): Promise<WriteReturnType<M, R>>;
|
|
7060
|
+
deleteRecord(pk: InferPK<C>, options?: Omit<BaseModelMethodOptions, "ignoreHooks">): Promise<void>;
|
|
7061
|
+
softDelete<const R extends ReturningColumns<M> = undefined>(pk: InferPK<C>, softDeleteOptions?: {
|
|
7062
|
+
column?: ModelKey<M>;
|
|
7063
|
+
value?: string | number | boolean | Date;
|
|
7064
|
+
}, options?: Omit<BaseModelMethodOptions, "ignoreHooks"> & {
|
|
7065
|
+
returning?: R;
|
|
7066
|
+
}): Promise<WriteReturnType<M, R>>;
|
|
7067
|
+
save<const R extends ReturningColumns<M> = undefined>(modelData: Partial<ModelWithoutRelations<M>>, options?: Omit<BaseModelMethodOptions, "ignoreHooks"> & {
|
|
7068
|
+
returning?: R;
|
|
7069
|
+
}): Promise<WriteReturnType<M, R>>;
|
|
7070
|
+
refresh(pk: InferPK<C>, options?: Omit<BaseModelMethodOptions, "ignoreHooks">): Promise<ModelQueryResult<M> | null>;
|
|
7071
|
+
};
|
|
7072
|
+
type DefinedModel<C extends Record<string, ColumnDef>, R extends Record<string, RelationDef>> = Omit<ConcreteModelStatics, PKNarrowedMethods> & DefinedModelPKOverrides<C, InferModel<C, R> & Model> & {
|
|
7001
7073
|
new (): InferModel<C, R> & Model;
|
|
7002
7074
|
};
|
|
7003
7075
|
|
|
@@ -8497,4 +8569,4 @@ declare const generateOpenApiModelWithMetadata: <T extends new () => Model>(mode
|
|
|
8497
8569
|
$id?: string;
|
|
8498
8570
|
}>;
|
|
8499
8571
|
|
|
8500
|
-
export { type AbstractConstructor, type AdminJsActionOptions, type AdminJsAssets, type AdminJsBranding, type AdminJsInstance, type AdminJsLocale, type AdminJsOptions, type AdminJsPage, type AdminJsPropertyOptions, type AdminJsResourceOptions, type AdminJsSettings, type AnyConstructor, type AnyModelConstructor, type AsymmetricEncryptionOptions, type BaseModelMethodOptions, type BaseModelRelationType, BaseSeeder, type BigIntFields, type BuildSelectType, type BuildSingleSelectType, type CacheAdapter, type CacheKeys, type CheckType, ClientMigrator, Collection, type ColumnDataTypeOption, type ColumnDataTypeOptionSimple, type ColumnDataTypeOptionWithBinary, type ColumnDataTypeOptionWithDatePrecision, type ColumnDataTypeOptionWithEnum, type ColumnDataTypeOptionWithLength, type ColumnDataTypeOptionWithPrecision, type ColumnDataTypeOptionWithScaleAndPrecision, type ColumnDataTypeOptionWithText, type ColumnDef, type ColumnOptions, type ColumnType, type CommonDataSourceInput, type ComposeBuildSelect, type ComposeSelect, type ConnectionPolicies, type Constructor, type CustomLogger, type DataSourceInput, type DataSourceType, type DateColumnOptions, type DatetimeColumnOptions, type DefinedModel, type ExcludeMethods, type ExtractColumnName, type ExtractSourceColumn, type FetchHooks, type FindReturnType, type GetColumnType, type GetConnectionReturnType, HysteriaError, InMemoryAdapter, type IncrementFields, type IndexType, type LazyRelationType, type LoggerConfig, type ManyOptions, type ManyToManyOptions, type ManyToManyStringOptions, Migration, type MigrationConfig, type MigrationConfigBase, type MixinColumns, MixinFactory, Model, type ModelDataProperties, type ModelInstanceType, type ModelKey, ModelQueryBuilder, type ModelQueryResult, type ModelRelation, type ModelSelectTuple, type ModelSelectableInput, type ModelWithoutRelations, MongoDataSource, type MongoDataSourceInput$1 as MongoDataSourceInput, type MssqlConnectionInstance, type MssqlDataSourceInput, type MssqlPoolInstance, type MysqlConnectionInstance, type MysqlSqlDataSourceInput, type NotNullableMysqlSqlDataSourceInput, type NotNullableOracleDBDataSourceInput, type NotNullableOracleMssqlDataSourceInput, type NotNullablePostgresSqlDataSourceInput, type NotNullableSqliteDataSourceInput, type NullableColumn, type NumberModelKey, type OneOptions, type OracleDBDataSourceInput, type OracleDBPoolInstance, type PgPoolClientInstance, type PostgresSqlDataSourceInput, QueryBuilder, type RawModelOptions, RawNode, type RawQueryOptions, RedisCacheAdapter, type RedisFetchable, type RedisStorable, type RelModelCallback, type RelatedInstance, type RelationDef, type RelationNullableOption, type RelationQueryBuilderType, type ReplicationType, type ReturningColumns, type ReturningKey, Schema, SchemaBuilder, type SeederConfig, type SelectBrand, type SelectableColumn, type SelectedModel, type SlaveAlgorithm, type SlaveContext, type SqlCloneOptions, SqlDataSource, type SqlDataSourceInput, type SqlDataSourceModel, type SqlDataSourceType, type SqlDriverSpecificOptions, type SqlPoolType, type Sqlite3ConnectionOptions, type SqliteConnectionInstance, type SqliteDataSourceInput, type StartTransactionOptions, type SymmetricEncryptionOptions, type TableFormat, type ThroughModel, type TimestampFields, Transaction, type TransactionExecutionOptions, type TypedPrepare, type TypedPropertyDecorator, type TypedSerialize, type UlidFields, UlidMixin, type UniqueType, type UseCacheReturnType, type UseConnectionInput, type UuidFields, UuidMixin, WriteOperation, type WriteReturnType, belongsTo, bigIntMixin, check, col, column, createMixin, createModelFactory, defineMigrator, defineModel, generateOpenApiModel, generateOpenApiModelSchema, generateOpenApiModelWithMetadata, getChecks, getCollectionProperties, getIndexes, getModelColumns, type getPoolReturnType, getPrimaryKey, getRelations, getRelationsMetadata, getUniques, hasMany, hasOne, incrementMixin, index, HysteriaLogger as logger, manyToMany, property, RedisDataSource as redis, rel, timestampMixin, ulidMixin, unique, uuidMixin, view, withPerformance };
|
|
8572
|
+
export { type AbstractConstructor, type AdminJsActionOptions, type AdminJsAssets, type AdminJsBranding, type AdminJsInstance, type AdminJsLocale, type AdminJsOptions, type AdminJsPage, type AdminJsPropertyOptions, type AdminJsResourceOptions, type AdminJsSettings, type AnyConstructor, type AnyModelConstructor, type AsymmetricEncryptionOptions, type BaseModelMethodOptions, type BaseModelRelationType, BaseSeeder, type BigIntFields, type BuildSelectType, type BuildSingleSelectType, type CacheAdapter, type CacheKeys, type CheckType, ClientMigrator, Collection, type ColumnDataTypeOption, type ColumnDataTypeOptionSimple, type ColumnDataTypeOptionWithBinary, type ColumnDataTypeOptionWithDatePrecision, type ColumnDataTypeOptionWithEnum, type ColumnDataTypeOptionWithLength, type ColumnDataTypeOptionWithPrecision, type ColumnDataTypeOptionWithScaleAndPrecision, type ColumnDataTypeOptionWithText, type ColumnDef, type ColumnOptions, type ColumnType, type CommonDataSourceInput, type ComposeBuildSelect, type ComposeSelect, type ConnectionPolicies, type Constructor, type CustomLogger, type DataSourceInput, type DataSourceType, type DateColumnOptions, type DatetimeColumnOptions, type DefinedModel, type ExcludeMethods, type ExtractColumnName, type ExtractSourceColumn, type FetchHooks, type FindReturnType, type GetColumnType, type GetConnectionReturnType, HysteriaError, InMemoryAdapter, type IncrementFields, type IndexType, type InferPK, type LazyRelationType, type LoggerConfig, type ManyOptions, type ManyToManyOptions, type ManyToManyStringOptions, Migration, type MigrationConfig, type MigrationConfigBase, type MixinColumns, MixinFactory, Model, type ModelDataProperties, type ModelInstanceType, type ModelKey, ModelQueryBuilder, type ModelQueryResult, type ModelRelation, type ModelSelectTuple, type ModelSelectableInput, type ModelWithoutRelations, MongoDataSource, type MongoDataSourceInput$1 as MongoDataSourceInput, type MssqlConnectionInstance, type MssqlDataSourceInput, type MssqlPoolInstance, type MysqlConnectionInstance, type MysqlSqlDataSourceInput, type NotNullableMysqlSqlDataSourceInput, type NotNullableOracleDBDataSourceInput, type NotNullableOracleMssqlDataSourceInput, type NotNullablePostgresSqlDataSourceInput, type NotNullableSqliteDataSourceInput, type NullableColumn, type NumberModelKey, type OneOptions, type OracleDBDataSourceInput, type OracleDBPoolInstance, type PgPoolClientInstance, type PostgresSqlDataSourceInput, type PrimaryColumnDef, QueryBuilder, type RawModelOptions, RawNode, type RawQueryOptions, RedisCacheAdapter, type RedisFetchable, type RedisStorable, type RelModelCallback, type RelatedInstance, type RelationDef, type RelationNullableOption, type RelationQueryBuilderType, type ReplicationType, type ReturningColumns, type ReturningKey, Schema, SchemaBuilder, type SeederConfig, type SelectBrand, type SelectableColumn, type SelectedModel, type SlaveAlgorithm, type SlaveContext, type SqlCloneOptions, SqlDataSource, type SqlDataSourceInput, type SqlDataSourceModel, type SqlDataSourceType, type SqlDriverSpecificOptions, type SqlPoolType, type Sqlite3ConnectionOptions, type SqliteConnectionInstance, type SqliteDataSourceInput, type StartTransactionOptions, type SymmetricEncryptionOptions, type TableFormat, type ThroughModel, type TimestampFields, Transaction, type TransactionExecutionOptions, type TypedDefault, type TypedPrepare, type TypedPropertyDecorator, type TypedSerialize, type UlidFields, UlidMixin, type UniqueType, type UseCacheReturnType, type UseConnectionInput, type UuidFields, UuidMixin, WriteOperation, type WriteReturnType, belongsTo, bigIntMixin, check, col, column, createMixin, createModelFactory, defineMigrator, defineModel, generateOpenApiModel, generateOpenApiModelSchema, generateOpenApiModelWithMetadata, getChecks, getCollectionProperties, getIndexes, getModelColumns, type getPoolReturnType, getPrimaryKey, getRelations, getRelationsMetadata, getUniques, hasMany, hasOne, incrementMixin, index, HysteriaLogger as logger, manyToMany, property, RedisDataSource as redis, rel, timestampMixin, ulidMixin, unique, uuidMixin, view, withPerformance };
|