orchid-orm 1.13.2 → 1.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +33 -63
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -320,39 +320,24 @@ declare const createBaseTable: <CT extends Record<string, orchid_core.AnyColumnT
|
|
|
320
320
|
tsquery(): pqb.TsQueryColumn;
|
|
321
321
|
uuid(): pqb.UUIDColumn;
|
|
322
322
|
xml(): pqb.XMLColumn;
|
|
323
|
-
json<Type extends orchid_core.
|
|
324
|
-
|
|
325
|
-
tuple: <T_5 extends [] | orchid_core.JSONTupleItems, Rest extends orchid_core.JSONTypeAny | null = null>(items: T_5, rest?: Rest) => orchid_core.JSONTuple<T_5, Rest>;
|
|
326
|
-
union: <T_6 extends [orchid_core.JSONTypeAny, orchid_core.JSONTypeAny, ...orchid_core.JSONTypeAny[]]>(types: T_6) => orchid_core.JSONUnion<T_6>;
|
|
327
|
-
any: () => orchid_core.JSONAny;
|
|
328
|
-
bigint: () => orchid_core.JSONBigInt;
|
|
323
|
+
json<Type extends orchid_core.JSONType<unknown, {}> = orchid_core.JSONUnknown>(schemaOrFn?: Type | ((j: {
|
|
324
|
+
unknown: () => orchid_core.JSONUnknown;
|
|
329
325
|
boolean: () => orchid_core.JSONBoolean;
|
|
330
|
-
date: () => orchid_core.JSONDate;
|
|
331
|
-
nan: () => orchid_core.JSONNaN;
|
|
332
|
-
never: () => orchid_core.JSONNever;
|
|
333
326
|
null: () => orchid_core.JSONNull;
|
|
334
327
|
number: () => orchid_core.JSONNumber;
|
|
335
328
|
string: () => orchid_core.JSONString;
|
|
336
|
-
unknown:
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
intersection: <Left extends orchid_core.
|
|
342
|
-
lazy: <
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
object: <T_14 extends orchid_core.JSONObjectShape, UnknownKeys extends orchid_core.UnknownKeysParam = "strip", Catchall extends orchid_core.JSONTypeAny = orchid_core.JSONTypeAny>(shape: T_14) => orchid_core.JSONObject<T_14, UnknownKeys, Catchall, orchid_core.JSONTypeAny extends Catchall ? orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }> extends infer T_15 extends object ? { [k in keyof T_15]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }>[k]; } : never : (orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }> extends infer T_18 extends object ? { [k in keyof T_18]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }>[k]; } : never) & {
|
|
349
|
-
[k: string]: Catchall["type"];
|
|
350
|
-
} extends infer T_16 extends object ? { [k_2 in keyof T_16]: ((orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }> extends infer T_17 extends object ? { [k in keyof T_17]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }>[k]; } : never) & {
|
|
351
|
-
[k: string]: Catchall["type"];
|
|
352
|
-
})[k_2]; } : never>;
|
|
353
|
-
optional: <T_19 extends orchid_core.JSONTypeAny>(type: T_19) => orchid_core.JSONOptional<T_19>;
|
|
354
|
-
record: typeof orchid_core.record;
|
|
355
|
-
}) => Type)): pqb.JSONColumn<Type>;
|
|
329
|
+
array: <T_5 extends orchid_core.JSONType<unknown, {}>>(item: T_5) => orchid_core.JSONArray<T_5, "many">;
|
|
330
|
+
object: <Shape extends orchid_core.JSONObjectShape>(shape: Shape) => orchid_core.JSONObject<Shape, "strip", orchid_core.JSONType<unknown, {}>>;
|
|
331
|
+
literal: <T_6 extends orchid_core.JSONPrimitive>(value: T_6) => orchid_core.JSONLiteral<T_6>;
|
|
332
|
+
discriminatedUnion: <Discriminator extends string, Types extends orchid_core.JSONDiscriminatedUnionArg<Discriminator>>(discriminator: Discriminator, types: Types) => orchid_core.JSONDiscriminatedUnion<Discriminator, Types>;
|
|
333
|
+
enum: <U_1 extends string, T_7 extends [U_1, ...U_1[]]>(options: T_7) => orchid_core.JSONEnum<string, T_7>;
|
|
334
|
+
intersection: <Left extends orchid_core.JSONType<unknown, {}>, Right extends orchid_core.JSONType<unknown, {}>>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
335
|
+
lazy: <T_8 extends orchid_core.JSONType<unknown, {}>>(fn: () => T_8) => orchid_core.JSONLazy<T_8>;
|
|
336
|
+
nativeEnum: <T_9 extends orchid_core.EnumLike>(type: T_9) => orchid_core.JSONNativeEnum<T_9>;
|
|
337
|
+
record: <Key extends orchid_core.JSONNumber | orchid_core.JSONString, Value extends orchid_core.JSONType<unknown, {}>>(...args: [value: Value] | [key: Key, value: Value]) => orchid_core.JSONRecord<Key, Value>;
|
|
338
|
+
tuple: <T_10 extends orchid_core.JSONTupleItems, Rest extends orchid_core.JSONType<unknown, {}> | undefined = undefined>(items: T_10, rest?: Rest | undefined) => orchid_core.JSONTuple<T_10, Rest>;
|
|
339
|
+
union: <T_11 extends orchid_core.JSONUnionArgs>(...types: T_11) => orchid_core.JSONUnion<T_11>;
|
|
340
|
+
}) => Type) | undefined): pqb.JSONColumn<Type>;
|
|
356
341
|
jsonText(): pqb.JSONTextColumn;
|
|
357
342
|
array<Item extends pqb.ColumnType<unknown, pqb.BaseOperators, unknown>>(item: Item): pqb.ArrayColumn<Item>;
|
|
358
343
|
type(dataType: string): pqb.CustomTypeColumn;
|
|
@@ -379,9 +364,9 @@ declare const createBaseTable: <CT extends Record<string, orchid_core.AnyColumnT
|
|
|
379
364
|
language: string | undefined;
|
|
380
365
|
filePath: string;
|
|
381
366
|
result: ColumnsShapeBase;
|
|
382
|
-
clone<
|
|
367
|
+
clone<T_12 extends QueryBase>(this: T_12): T_12;
|
|
383
368
|
getFilePath(): string;
|
|
384
|
-
setColumns<
|
|
369
|
+
setColumns<T_13 extends ColumnsShape>(fn: (t: Record<string, orchid_core.AnyColumnTypeCreator> extends CT ? {
|
|
385
370
|
timestamps<T extends orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>(this: {
|
|
386
371
|
name(name: string): {
|
|
387
372
|
timestamp(): T;
|
|
@@ -475,39 +460,24 @@ declare const createBaseTable: <CT extends Record<string, orchid_core.AnyColumnT
|
|
|
475
460
|
tsquery(): pqb.TsQueryColumn;
|
|
476
461
|
uuid(): pqb.UUIDColumn;
|
|
477
462
|
xml(): pqb.XMLColumn;
|
|
478
|
-
json<Type extends orchid_core.
|
|
479
|
-
|
|
480
|
-
tuple: <T_5 extends [] | orchid_core.JSONTupleItems, Rest extends orchid_core.JSONTypeAny | null = null>(items: T_5, rest?: Rest) => orchid_core.JSONTuple<T_5, Rest>;
|
|
481
|
-
union: <T_6 extends [orchid_core.JSONTypeAny, orchid_core.JSONTypeAny, ...orchid_core.JSONTypeAny[]]>(types: T_6) => orchid_core.JSONUnion<T_6>;
|
|
482
|
-
any: () => orchid_core.JSONAny;
|
|
483
|
-
bigint: () => orchid_core.JSONBigInt;
|
|
463
|
+
json<Type extends orchid_core.JSONType<unknown, {}> = orchid_core.JSONUnknown>(schemaOrFn?: Type | ((j: {
|
|
464
|
+
unknown: () => orchid_core.JSONUnknown;
|
|
484
465
|
boolean: () => orchid_core.JSONBoolean;
|
|
485
|
-
date: () => orchid_core.JSONDate;
|
|
486
|
-
nan: () => orchid_core.JSONNaN;
|
|
487
|
-
never: () => orchid_core.JSONNever;
|
|
488
466
|
null: () => orchid_core.JSONNull;
|
|
489
467
|
number: () => orchid_core.JSONNumber;
|
|
490
468
|
string: () => orchid_core.JSONString;
|
|
491
|
-
unknown:
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
intersection: <Left extends orchid_core.
|
|
497
|
-
lazy: <
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
object: <T_14 extends orchid_core.JSONObjectShape, UnknownKeys extends orchid_core.UnknownKeysParam = "strip", Catchall extends orchid_core.JSONTypeAny = orchid_core.JSONTypeAny>(shape: T_14) => orchid_core.JSONObject<T_14, UnknownKeys, Catchall, orchid_core.JSONTypeAny extends Catchall ? orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }> extends infer T_22 extends object ? { [k in keyof T_22]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }>[k]; } : never : (orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }> extends infer T_25 extends object ? { [k in keyof T_25]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }>[k]; } : never) & {
|
|
504
|
-
[k: string]: Catchall["type"];
|
|
505
|
-
} extends infer T_23 extends object ? { [k_2 in keyof T_23]: ((orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }> extends infer T_24 extends object ? { [k in keyof T_24]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_14]: T_14[k_1]["type"]; }>[k]; } : never) & {
|
|
506
|
-
[k: string]: Catchall["type"];
|
|
507
|
-
})[k_2]; } : never>;
|
|
508
|
-
optional: <T_19 extends orchid_core.JSONTypeAny>(type: T_19) => orchid_core.JSONOptional<T_19>;
|
|
509
|
-
record: typeof orchid_core.record;
|
|
510
|
-
}) => Type)): pqb.JSONColumn<Type>;
|
|
469
|
+
array: <T_5 extends orchid_core.JSONType<unknown, {}>>(item: T_5) => orchid_core.JSONArray<T_5, "many">;
|
|
470
|
+
object: <Shape extends orchid_core.JSONObjectShape>(shape: Shape) => orchid_core.JSONObject<Shape, "strip", orchid_core.JSONType<unknown, {}>>;
|
|
471
|
+
literal: <T_6 extends orchid_core.JSONPrimitive>(value: T_6) => orchid_core.JSONLiteral<T_6>;
|
|
472
|
+
discriminatedUnion: <Discriminator extends string, Types extends orchid_core.JSONDiscriminatedUnionArg<Discriminator>>(discriminator: Discriminator, types: Types) => orchid_core.JSONDiscriminatedUnion<Discriminator, Types>;
|
|
473
|
+
enum: <U_1 extends string, T_7 extends [U_1, ...U_1[]]>(options: T_7) => orchid_core.JSONEnum<string, T_7>;
|
|
474
|
+
intersection: <Left extends orchid_core.JSONType<unknown, {}>, Right extends orchid_core.JSONType<unknown, {}>>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
475
|
+
lazy: <T_8 extends orchid_core.JSONType<unknown, {}>>(fn: () => T_8) => orchid_core.JSONLazy<T_8>;
|
|
476
|
+
nativeEnum: <T_9 extends orchid_core.EnumLike>(type: T_9) => orchid_core.JSONNativeEnum<T_9>;
|
|
477
|
+
record: <Key extends orchid_core.JSONNumber | orchid_core.JSONString, Value extends orchid_core.JSONType<unknown, {}>>(...args: [value: Value] | [key: Key, value: Value]) => orchid_core.JSONRecord<Key, Value>;
|
|
478
|
+
tuple: <T_10 extends orchid_core.JSONTupleItems, Rest extends orchid_core.JSONType<unknown, {}> | undefined = undefined>(items: T_10, rest?: Rest | undefined) => orchid_core.JSONTuple<T_10, Rest>;
|
|
479
|
+
union: <T_11 extends orchid_core.JSONUnionArgs>(...types: T_11) => orchid_core.JSONUnion<T_11>;
|
|
480
|
+
}) => Type) | undefined): pqb.JSONColumn<Type>;
|
|
511
481
|
jsonText(): pqb.JSONTextColumn;
|
|
512
482
|
array<Item extends pqb.ColumnType<unknown, pqb.BaseOperators, unknown>>(item: Item): pqb.ArrayColumn<Item>;
|
|
513
483
|
type(dataType: string): pqb.CustomTypeColumn;
|
|
@@ -529,9 +499,9 @@ declare const createBaseTable: <CT extends Record<string, orchid_core.AnyColumnT
|
|
|
529
499
|
dropMode?: pqb.DropMode | undefined;
|
|
530
500
|
}) | undefined): {};
|
|
531
501
|
check(check: orchid_core.RawSQLBase<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>, {}>): {};
|
|
532
|
-
} : CT) =>
|
|
533
|
-
shape:
|
|
534
|
-
type: ColumnShapeOutput<
|
|
502
|
+
} : CT) => T_13): {
|
|
503
|
+
shape: T_13;
|
|
504
|
+
type: ColumnShapeOutput<T_13>;
|
|
535
505
|
};
|
|
536
506
|
belongsTo<Self extends any, Related extends TableClass<Table>, Scope extends Query, Options extends {
|
|
537
507
|
primaryKey: keyof InstanceType<Related>["columns"]["shape"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orchid-orm",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.3",
|
|
4
4
|
"description": "Postgres ORM",
|
|
5
5
|
"homepage": "https://orchid-orm.netlify.app/guide/orm-and-query-builder.html",
|
|
6
6
|
"repository": {
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"inflection": "*",
|
|
54
54
|
"prompts": "^2.4.2",
|
|
55
|
-
"orchid-core": "0.
|
|
56
|
-
"pqb": "0.
|
|
55
|
+
"orchid-core": "0.8.0",
|
|
56
|
+
"pqb": "0.16.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/prompts": "^2.4.2",
|
|
60
|
-
"orchid-orm-schema-to-zod": "0.3.
|
|
61
|
-
"rake-db": "2.10.
|
|
60
|
+
"orchid-orm-schema-to-zod": "0.3.92",
|
|
61
|
+
"rake-db": "2.10.3",
|
|
62
62
|
"test-utils": "0.0.2"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|