pqb 0.15.2 → 0.16.0
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 +37 -313
- package/dist/index.js +75 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -131
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as orchid_core from 'orchid-core';
|
|
2
|
-
import { QueryResultRow, AdapterBase, QueryInput, Sql, ColumnTypesBase, ColumnShapeOutput, DefaultSelectColumns, DbBase, QueryThen, QueryCatch, TransactionState, SQLQueryArgs, QueryBaseCommon, ColumnsShapeBase, QueryInternal, QueryMetaBase, EmptyObject, Expression, ColumnTypeBase, MaybeArray, TemplateLiteralArgs, ColumnsParsers, getValueKey, StringKey, NullableColumn, EmptyTuple, SetOptional, MergeObjects, RawSQLBase, RawSQLValues, RawSQLArgs, Spread, ColumnOperatorBase, ColumnOperatorFnBase, Code, ArrayMethodsData,
|
|
2
|
+
import { QueryResultRow, AdapterBase, QueryInput, Sql, ColumnTypesBase, ColumnShapeOutput, DefaultSelectColumns, DbBase, QueryThen, QueryCatch, TransactionState, SQLQueryArgs, QueryBaseCommon, ColumnsShapeBase, QueryInternal, QueryMetaBase, EmptyObject, Expression, ColumnTypeBase, MaybeArray, TemplateLiteralArgs, ColumnsParsers, getValueKey, StringKey, NullableColumn, EmptyTuple, SetOptional, MergeObjects, RawSQLBase, RawSQLValues, RawSQLArgs, Spread, ColumnOperatorBase, ColumnOperatorFnBase, Code, ArrayMethodsData, arrayTypeMethods, JSONType, JSONUnknown, JSONTypes, StringTypeData, PrimaryKeyColumn, stringTypeMethods, ForeignKeyTable, name, ColumnNameOfTable, BaseNumberData, NumberTypeMethods, ColumnWithDefault, DateTypeMethods, DateColumnData, EncodeColumn, ParseColumn, ValidationContext, ErrorMessage, ColumnDataBase } from 'orchid-core';
|
|
3
3
|
import { PoolConfig, Pool, PoolClient } from 'pg';
|
|
4
4
|
import { inspect } from 'util';
|
|
5
5
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
@@ -3684,39 +3684,24 @@ declare const raw: <T = unknown>(...args: RawSQLArgs) => RawSQL<ColumnTypeBase<T
|
|
|
3684
3684
|
tsquery(): TsQueryColumn;
|
|
3685
3685
|
uuid(): UUIDColumn;
|
|
3686
3686
|
xml(): XMLColumn;
|
|
3687
|
-
json<Type extends orchid_core.
|
|
3688
|
-
|
|
3689
|
-
tuple: <T_6 extends [] | orchid_core.JSONTupleItems, Rest extends orchid_core.JSONTypeAny | null = null>(items: T_6, rest?: Rest) => orchid_core.JSONTuple<T_6, Rest>;
|
|
3690
|
-
union: <T_7 extends [orchid_core.JSONTypeAny, orchid_core.JSONTypeAny, ...orchid_core.JSONTypeAny[]]>(types: T_7) => orchid_core.JSONUnion<T_7>;
|
|
3691
|
-
any: () => orchid_core.JSONAny;
|
|
3692
|
-
bigint: () => orchid_core.JSONBigInt;
|
|
3687
|
+
json<Type extends orchid_core.JSONType<unknown, {}> = orchid_core.JSONUnknown>(schemaOrFn?: Type | ((j: {
|
|
3688
|
+
unknown: () => orchid_core.JSONUnknown;
|
|
3693
3689
|
boolean: () => orchid_core.JSONBoolean;
|
|
3694
|
-
date: () => orchid_core.JSONDate;
|
|
3695
|
-
nan: () => orchid_core.JSONNaN;
|
|
3696
|
-
never: () => orchid_core.JSONNever;
|
|
3697
3690
|
null: () => orchid_core.JSONNull;
|
|
3698
3691
|
number: () => orchid_core.JSONNumber;
|
|
3699
3692
|
string: () => orchid_core.JSONString;
|
|
3700
|
-
unknown:
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
intersection: <Left extends orchid_core.
|
|
3706
|
-
lazy: <
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
object: <T_15 extends orchid_core.JSONObjectShape, UnknownKeys extends orchid_core.UnknownKeysParam = "strip", Catchall extends orchid_core.JSONTypeAny = orchid_core.JSONTypeAny>(shape: T_15) => orchid_core.JSONObject<T_15, UnknownKeys, Catchall, orchid_core.JSONTypeAny extends Catchall ? orchid_core.addQuestionMarks<{ [k_1 in keyof T_15]: T_15[k_1]["type"]; }> extends infer T_16 extends object ? { [k in keyof T_16]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_15]: T_15[k_1]["type"]; }>[k]; } : never : (orchid_core.addQuestionMarks<{ [k_1 in keyof T_15]: T_15[k_1]["type"]; }> extends infer T_19 extends object ? { [k in keyof T_19]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_15]: T_15[k_1]["type"]; }>[k]; } : never) & {
|
|
3713
|
-
[k: string]: Catchall["type"];
|
|
3714
|
-
} extends infer T_17 extends object ? { [k_2 in keyof T_17]: ((orchid_core.addQuestionMarks<{ [k_1 in keyof T_15]: T_15[k_1]["type"]; }> extends infer T_18 extends object ? { [k in keyof T_18]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_15]: T_15[k_1]["type"]; }>[k]; } : never) & {
|
|
3715
|
-
[k: string]: Catchall["type"];
|
|
3716
|
-
})[k_2]; } : never>;
|
|
3717
|
-
optional: <T_20 extends orchid_core.JSONTypeAny>(type: T_20) => orchid_core.JSONOptional<T_20>;
|
|
3718
|
-
record: typeof orchid_core.record;
|
|
3719
|
-
}) => Type)): JSONColumn<Type>;
|
|
3693
|
+
array: <T_6 extends orchid_core.JSONType<unknown, {}>>(item: T_6) => orchid_core.JSONArray<T_6, "many">;
|
|
3694
|
+
object: <Shape extends orchid_core.JSONObjectShape>(shape: Shape) => orchid_core.JSONObject<Shape, "strip", orchid_core.JSONType<unknown, {}>>;
|
|
3695
|
+
literal: <T_7 extends orchid_core.JSONPrimitive>(value: T_7) => orchid_core.JSONLiteral<T_7>;
|
|
3696
|
+
discriminatedUnion: <Discriminator extends string, Types extends orchid_core.JSONDiscriminatedUnionArg<Discriminator>>(discriminator: Discriminator, types: Types) => orchid_core.JSONDiscriminatedUnion<Discriminator, Types>;
|
|
3697
|
+
enum: <U_1 extends string, T_8 extends [U_1, ...U_1[]]>(options: T_8) => orchid_core.JSONEnum<string, T_8>;
|
|
3698
|
+
intersection: <Left extends orchid_core.JSONType<unknown, {}>, Right extends orchid_core.JSONType<unknown, {}>>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
3699
|
+
lazy: <T_9 extends orchid_core.JSONType<unknown, {}>>(fn: () => T_9) => orchid_core.JSONLazy<T_9>;
|
|
3700
|
+
nativeEnum: <T_10 extends orchid_core.EnumLike>(type: T_10) => orchid_core.JSONNativeEnum<T_10>;
|
|
3701
|
+
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>;
|
|
3702
|
+
tuple: <T_11 extends orchid_core.JSONTupleItems, Rest extends orchid_core.JSONType<unknown, {}> | undefined = undefined>(items: T_11, rest?: Rest | undefined) => orchid_core.JSONTuple<T_11, Rest>;
|
|
3703
|
+
union: <T_12 extends orchid_core.JSONUnionArgs>(...types: T_12) => orchid_core.JSONUnion<T_12>;
|
|
3704
|
+
}) => Type) | undefined): JSONColumn<Type>;
|
|
3720
3705
|
jsonText(): JSONTextColumn;
|
|
3721
3706
|
array<Item extends ColumnType<unknown, BaseOperators, unknown>>(item: Item): ArrayColumn<Item>;
|
|
3722
3707
|
type(dataType: string): CustomTypeColumn;
|
|
@@ -4578,7 +4563,7 @@ declare class DomainColumn extends CustomTypeColumn {
|
|
|
4578
4563
|
type ArrayData<Item extends ColumnTypeBase> = ColumnData & ArrayMethodsData & {
|
|
4579
4564
|
item: Item;
|
|
4580
4565
|
};
|
|
4581
|
-
type ArrayMethods = typeof
|
|
4566
|
+
type ArrayMethods = typeof arrayTypeMethods;
|
|
4582
4567
|
interface ArrayColumn<Item extends ColumnTypeBase> extends ColumnType<Item['type'][], typeof Operators.array>, ArrayMethods {
|
|
4583
4568
|
}
|
|
4584
4569
|
declare class ArrayColumn<Item extends ColumnTypeBase> extends ColumnType<Item['type'][], typeof Operators.array> {
|
|
@@ -4598,41 +4583,7 @@ declare class ArrayColumn<Item extends ColumnTypeBase> extends ColumnType<Item['
|
|
|
4598
4583
|
};
|
|
4599
4584
|
}
|
|
4600
4585
|
|
|
4601
|
-
|
|
4602
|
-
declare const jsonTypes: {
|
|
4603
|
-
set: <Value extends JSONTypeAny>(valueType: Value) => orchid_core.JSONSet<Value>;
|
|
4604
|
-
tuple: <T extends [] | orchid_core.JSONTupleItems, Rest extends JSONTypeAny | null = null>(items: T, rest?: Rest) => orchid_core.JSONTuple<T, Rest>;
|
|
4605
|
-
union: <T_1 extends [JSONTypeAny, JSONTypeAny, ...JSONTypeAny[]]>(types: T_1) => orchid_core.JSONUnion<T_1>;
|
|
4606
|
-
any: () => orchid_core.JSONAny;
|
|
4607
|
-
bigint: () => orchid_core.JSONBigInt;
|
|
4608
|
-
boolean: () => orchid_core.JSONBoolean;
|
|
4609
|
-
date: () => orchid_core.JSONDate;
|
|
4610
|
-
nan: () => orchid_core.JSONNaN;
|
|
4611
|
-
never: () => orchid_core.JSONNever;
|
|
4612
|
-
null: () => orchid_core.JSONNull;
|
|
4613
|
-
number: () => orchid_core.JSONNumber;
|
|
4614
|
-
string: () => orchid_core.JSONString;
|
|
4615
|
-
unknown: () => orchid_core.JSONUnknown;
|
|
4616
|
-
array: <Type extends JSONTypeAny>(element: Type) => orchid_core.JSONArray<Type, "many">;
|
|
4617
|
-
discriminatedUnion: <Discriminator extends string, DiscriminatorValue extends orchid_core.Primitive, Types extends [orchid_core.JSONDiscriminatedObject<Discriminator, DiscriminatorValue>, orchid_core.JSONDiscriminatedObject<Discriminator, DiscriminatorValue>, ...orchid_core.JSONDiscriminatedObject<Discriminator, DiscriminatorValue>[]]>(discriminator: Discriminator, options: Types) => orchid_core.JSONDiscriminatedUnion<Discriminator, DiscriminatorValue, Types>;
|
|
4618
|
-
enum: <U extends string, T_2 extends [U, ...U[]]>(options: T_2) => orchid_core.JSONEnum<U, T_2>;
|
|
4619
|
-
instanceOf: <T_3 extends new (...args: any[]) => any>(cls: T_3) => orchid_core.JSONInstanceOf<T_3>;
|
|
4620
|
-
intersection: <Left extends JSONTypeAny, Right extends JSONTypeAny>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
4621
|
-
lazy: <T_4 extends JSONTypeAny>(fn: () => T_4) => orchid_core.JSONLazy<T_4>;
|
|
4622
|
-
literal: <T_5 extends orchid_core.Primitive>(value: T_5) => orchid_core.JSONLiteral<T_5>;
|
|
4623
|
-
map: <Key extends JSONTypeAny, Value_1 extends JSONTypeAny>(keyType: Key, valueType: Value_1) => orchid_core.JSONMap<Key, Value_1>;
|
|
4624
|
-
nativeEnum: <T_6 extends orchid_core.EnumLike>(givenEnum: T_6) => orchid_core.JSONNativeEnum<T_6>;
|
|
4625
|
-
nullable: <T_7 extends JSONTypeAny>(type: T_7) => orchid_core.JSONNullable<T_7>;
|
|
4626
|
-
nullish: <T_8 extends JSONTypeAny>(type: T_8) => orchid_core.JSONNullish<T_8>;
|
|
4627
|
-
object: <T_9 extends orchid_core.JSONObjectShape, UnknownKeys extends orchid_core.UnknownKeysParam = "strip", Catchall extends JSONTypeAny = JSONTypeAny>(shape: T_9) => orchid_core.JSONObject<T_9, UnknownKeys, Catchall, JSONTypeAny extends Catchall ? orchid_core.addQuestionMarks<{ [k_1 in keyof T_9]: T_9[k_1]["type"]; }> extends infer T_10 extends object ? { [k in keyof T_10]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_9]: T_9[k_1]["type"]; }>[k]; } : never : (orchid_core.addQuestionMarks<{ [k_1 in keyof T_9]: T_9[k_1]["type"]; }> extends infer T_13 extends object ? { [k in keyof T_13]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_9]: T_9[k_1]["type"]; }>[k]; } : never) & {
|
|
4628
|
-
[k: string]: Catchall["type"];
|
|
4629
|
-
} extends infer T_11 extends object ? { [k_2 in keyof T_11]: ((orchid_core.addQuestionMarks<{ [k_1 in keyof T_9]: T_9[k_1]["type"]; }> extends infer T_12 extends object ? { [k in keyof T_12]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_9]: T_9[k_1]["type"]; }>[k]; } : never) & {
|
|
4630
|
-
[k: string]: Catchall["type"];
|
|
4631
|
-
})[k_2]; } : never>;
|
|
4632
|
-
optional: <T_14 extends JSONTypeAny>(type: T_14) => orchid_core.JSONOptional<T_14>;
|
|
4633
|
-
record: typeof record;
|
|
4634
|
-
};
|
|
4635
|
-
declare class JSONColumn<Type extends JSONTypeAny = JSONTypeAny> extends ColumnType<Type['type'], typeof Operators.json> {
|
|
4586
|
+
declare class JSONColumn<Type extends JSONType = JSONUnknown> extends ColumnType<Type['type'], typeof Operators.json> {
|
|
4636
4587
|
dataType: "jsonb";
|
|
4637
4588
|
operators: {
|
|
4638
4589
|
jsonPath: Operator<[path: string, op: string, value: unknown]>;
|
|
@@ -4698,205 +4649,8 @@ declare class BooleanColumn extends ColumnType<boolean, typeof Operators.boolean
|
|
|
4698
4649
|
type BooleanNullable = NullableColumn<BooleanColumn>;
|
|
4699
4650
|
|
|
4700
4651
|
type StringColumn = ColumnType<string, typeof Operators.text>;
|
|
4701
|
-
type TextColumnData =
|
|
4702
|
-
type TextMethods = typeof
|
|
4703
|
-
declare const textMethods: {
|
|
4704
|
-
email<T extends {
|
|
4705
|
-
data: {
|
|
4706
|
-
email?: boolean | undefined;
|
|
4707
|
-
};
|
|
4708
|
-
}>(this: T, params?: orchid_core.MessageParam | undefined): Omit<T, "data"> & {
|
|
4709
|
-
data: Omit<T["data"], "email"> & {
|
|
4710
|
-
email: boolean;
|
|
4711
|
-
};
|
|
4712
|
-
};
|
|
4713
|
-
url<T_1 extends {
|
|
4714
|
-
data: {
|
|
4715
|
-
url?: boolean | undefined;
|
|
4716
|
-
};
|
|
4717
|
-
}>(this: T_1, params?: orchid_core.MessageParam | undefined): Omit<T_1, "data"> & {
|
|
4718
|
-
data: Omit<T_1["data"], "url"> & {
|
|
4719
|
-
url: boolean;
|
|
4720
|
-
};
|
|
4721
|
-
};
|
|
4722
|
-
emoji<T_2 extends {
|
|
4723
|
-
data: {
|
|
4724
|
-
emoji?: boolean | undefined;
|
|
4725
|
-
};
|
|
4726
|
-
}>(this: T_2, params?: orchid_core.MessageParam | undefined): Omit<T_2, "data"> & {
|
|
4727
|
-
data: Omit<T_2["data"], "emoji"> & {
|
|
4728
|
-
emoji: boolean;
|
|
4729
|
-
};
|
|
4730
|
-
};
|
|
4731
|
-
uuid<T_3 extends {
|
|
4732
|
-
data: {
|
|
4733
|
-
uuid?: boolean | undefined;
|
|
4734
|
-
};
|
|
4735
|
-
}>(this: T_3, params?: orchid_core.MessageParam | undefined): Omit<T_3, "data"> & {
|
|
4736
|
-
data: Omit<T_3["data"], "uuid"> & {
|
|
4737
|
-
uuid: boolean;
|
|
4738
|
-
};
|
|
4739
|
-
};
|
|
4740
|
-
cuid<T_4 extends {
|
|
4741
|
-
data: {
|
|
4742
|
-
cuid?: boolean | undefined;
|
|
4743
|
-
};
|
|
4744
|
-
}>(this: T_4, params?: orchid_core.MessageParam | undefined): Omit<T_4, "data"> & {
|
|
4745
|
-
data: Omit<T_4["data"], "cuid"> & {
|
|
4746
|
-
cuid: boolean;
|
|
4747
|
-
};
|
|
4748
|
-
};
|
|
4749
|
-
cuid2<T_5 extends {
|
|
4750
|
-
data: {
|
|
4751
|
-
cuid2?: boolean | undefined;
|
|
4752
|
-
};
|
|
4753
|
-
}>(this: T_5, params?: orchid_core.MessageParam | undefined): Omit<T_5, "data"> & {
|
|
4754
|
-
data: Omit<T_5["data"], "cuid2"> & {
|
|
4755
|
-
cuid2: boolean;
|
|
4756
|
-
};
|
|
4757
|
-
};
|
|
4758
|
-
ulid<T_6 extends {
|
|
4759
|
-
data: {
|
|
4760
|
-
ulid?: boolean | undefined;
|
|
4761
|
-
};
|
|
4762
|
-
}>(this: T_6, params?: orchid_core.MessageParam | undefined): Omit<T_6, "data"> & {
|
|
4763
|
-
data: Omit<T_6["data"], "ulid"> & {
|
|
4764
|
-
ulid: boolean;
|
|
4765
|
-
};
|
|
4766
|
-
};
|
|
4767
|
-
regex<T_7 extends {
|
|
4768
|
-
data: {
|
|
4769
|
-
regex?: RegExp | undefined;
|
|
4770
|
-
};
|
|
4771
|
-
}, Value extends RegExp>(this: T_7, value: Value, params?: orchid_core.MessageParam | undefined): Omit<T_7, "data"> & {
|
|
4772
|
-
data: Omit<T_7["data"], "regex"> & {
|
|
4773
|
-
regex: Value;
|
|
4774
|
-
};
|
|
4775
|
-
};
|
|
4776
|
-
includes<T_8 extends {
|
|
4777
|
-
data: {
|
|
4778
|
-
includes?: string | undefined;
|
|
4779
|
-
};
|
|
4780
|
-
}, Value_1 extends string>(this: T_8, value: Value_1, params?: orchid_core.MessageParam | undefined): Omit<T_8, "data"> & {
|
|
4781
|
-
data: Omit<T_8["data"], "includes"> & {
|
|
4782
|
-
includes: Value_1;
|
|
4783
|
-
};
|
|
4784
|
-
};
|
|
4785
|
-
startsWith<T_9 extends {
|
|
4786
|
-
data: {
|
|
4787
|
-
startsWith?: string | undefined;
|
|
4788
|
-
};
|
|
4789
|
-
}, Value_2 extends string>(this: T_9, value: Value_2, params?: orchid_core.MessageParam | undefined): Omit<T_9, "data"> & {
|
|
4790
|
-
data: Omit<T_9["data"], "startsWith"> & {
|
|
4791
|
-
startsWith: Value_2;
|
|
4792
|
-
};
|
|
4793
|
-
};
|
|
4794
|
-
endsWith<T_10 extends {
|
|
4795
|
-
data: {
|
|
4796
|
-
endsWith?: string | undefined;
|
|
4797
|
-
};
|
|
4798
|
-
}, Value_3 extends string>(this: T_10, value: Value_3, params?: orchid_core.MessageParam | undefined): Omit<T_10, "data"> & {
|
|
4799
|
-
data: Omit<T_10["data"], "endsWith"> & {
|
|
4800
|
-
endsWith: Value_3;
|
|
4801
|
-
};
|
|
4802
|
-
};
|
|
4803
|
-
datetime<T_11 extends {
|
|
4804
|
-
data: {
|
|
4805
|
-
datetime?: {
|
|
4806
|
-
offset?: boolean | undefined;
|
|
4807
|
-
precision?: number | undefined;
|
|
4808
|
-
} | undefined;
|
|
4809
|
-
};
|
|
4810
|
-
}>(this: T_11, params?: {
|
|
4811
|
-
offset?: boolean | undefined;
|
|
4812
|
-
precision?: number | undefined;
|
|
4813
|
-
} & {
|
|
4814
|
-
message?: string | undefined;
|
|
4815
|
-
}): Omit<T_11, "data"> & {
|
|
4816
|
-
data: Omit<T_11["data"], "datetime"> & {
|
|
4817
|
-
datetime: {
|
|
4818
|
-
offset?: boolean | undefined;
|
|
4819
|
-
precision?: number | undefined;
|
|
4820
|
-
} & {
|
|
4821
|
-
message?: string | undefined;
|
|
4822
|
-
};
|
|
4823
|
-
};
|
|
4824
|
-
};
|
|
4825
|
-
ip<T_12 extends {
|
|
4826
|
-
data: {
|
|
4827
|
-
ip?: {
|
|
4828
|
-
version?: "v4" | "v6" | undefined;
|
|
4829
|
-
} | undefined;
|
|
4830
|
-
};
|
|
4831
|
-
}>(this: T_12, params?: {
|
|
4832
|
-
version?: "v4" | "v6" | undefined;
|
|
4833
|
-
} & {
|
|
4834
|
-
message?: string | undefined;
|
|
4835
|
-
}): Omit<T_12, "data"> & {
|
|
4836
|
-
data: Omit<T_12["data"], "ip"> & {
|
|
4837
|
-
ip: {
|
|
4838
|
-
version?: "v4" | "v6" | undefined;
|
|
4839
|
-
} & {
|
|
4840
|
-
message?: string | undefined;
|
|
4841
|
-
};
|
|
4842
|
-
};
|
|
4843
|
-
};
|
|
4844
|
-
trim<T_13 extends {
|
|
4845
|
-
data: {
|
|
4846
|
-
trim?: boolean | undefined;
|
|
4847
|
-
};
|
|
4848
|
-
}>(this: T_13, params?: orchid_core.MessageParam | undefined): Omit<T_13, "data"> & {
|
|
4849
|
-
data: Omit<T_13["data"], "trim"> & {
|
|
4850
|
-
trim: boolean;
|
|
4851
|
-
};
|
|
4852
|
-
};
|
|
4853
|
-
toLowerCase<T_14 extends {
|
|
4854
|
-
data: {
|
|
4855
|
-
toLowerCase?: boolean | undefined;
|
|
4856
|
-
};
|
|
4857
|
-
}>(this: T_14, params?: orchid_core.MessageParam | undefined): Omit<T_14, "data"> & {
|
|
4858
|
-
data: Omit<T_14["data"], "toLowerCase"> & {
|
|
4859
|
-
toLowerCase: boolean;
|
|
4860
|
-
};
|
|
4861
|
-
};
|
|
4862
|
-
toUpperCase<T_15 extends {
|
|
4863
|
-
data: {
|
|
4864
|
-
toUpperCase?: boolean | undefined;
|
|
4865
|
-
};
|
|
4866
|
-
}>(this: T_15, params?: orchid_core.MessageParam | undefined): Omit<T_15, "data"> & {
|
|
4867
|
-
data: Omit<T_15["data"], "toUpperCase"> & {
|
|
4868
|
-
toUpperCase: boolean;
|
|
4869
|
-
};
|
|
4870
|
-
};
|
|
4871
|
-
min: <T_16 extends {
|
|
4872
|
-
data: {
|
|
4873
|
-
min?: number | undefined;
|
|
4874
|
-
};
|
|
4875
|
-
}, Value_4 extends number>(this: T_16, value: Value_4, params?: orchid_core.MessageParam | undefined) => Omit<T_16, "data"> & {
|
|
4876
|
-
data: Omit<T_16["data"], "min"> & {
|
|
4877
|
-
min: Value_4;
|
|
4878
|
-
};
|
|
4879
|
-
};
|
|
4880
|
-
max: <T_17 extends {
|
|
4881
|
-
data: {
|
|
4882
|
-
max?: number | undefined;
|
|
4883
|
-
};
|
|
4884
|
-
}, Value_5 extends number>(this: T_17, value: Value_5, params?: orchid_core.MessageParam | undefined) => Omit<T_17, "data"> & {
|
|
4885
|
-
data: Omit<T_17["data"], "max"> & {
|
|
4886
|
-
max: Value_5;
|
|
4887
|
-
};
|
|
4888
|
-
};
|
|
4889
|
-
length: <T_18 extends {
|
|
4890
|
-
data: {
|
|
4891
|
-
length?: number | undefined;
|
|
4892
|
-
};
|
|
4893
|
-
}, Value_6 extends number>(this: T_18, value: Value_6, params?: orchid_core.MessageParam | undefined) => Omit<T_18, "data"> & {
|
|
4894
|
-
data: Omit<T_18["data"], "length"> & {
|
|
4895
|
-
length: Value_6;
|
|
4896
|
-
};
|
|
4897
|
-
};
|
|
4898
|
-
nonEmpty: <T_19 extends orchid_core.NonEmptyBase>(this: T_19, params?: orchid_core.MessageParam | undefined) => orchid_core.NonEmptyResult<T_19>;
|
|
4899
|
-
};
|
|
4652
|
+
type TextColumnData = StringTypeData;
|
|
4653
|
+
type TextMethods = typeof stringTypeMethods;
|
|
4900
4654
|
interface TextBaseColumn extends ColumnType<string, typeof Operators.text>, TextMethods {
|
|
4901
4655
|
}
|
|
4902
4656
|
declare abstract class TextBaseColumn extends ColumnType<string, typeof Operators.text> {
|
|
@@ -5458,7 +5212,7 @@ declare const columnTypes: {
|
|
|
5458
5212
|
tsquery(): TsQueryColumn;
|
|
5459
5213
|
uuid(): UUIDColumn;
|
|
5460
5214
|
xml(): XMLColumn;
|
|
5461
|
-
json<Type extends
|
|
5215
|
+
json<Type extends JSONType<unknown, {}> = JSONUnknown>(schemaOrFn?: Type | ((j: JSONTypes) => Type) | undefined): JSONColumn<Type>;
|
|
5462
5216
|
jsonText(): JSONTextColumn;
|
|
5463
5217
|
array<Item extends ColumnType<unknown, BaseOperators, unknown>>(item: Item): ArrayColumn<Item>;
|
|
5464
5218
|
type(dataType: string): CustomTypeColumn;
|
|
@@ -5492,8 +5246,7 @@ type NumberColumnData = BaseNumberData & {
|
|
|
5492
5246
|
type SerialColumnData = NumberColumnData & {
|
|
5493
5247
|
default: Expression;
|
|
5494
5248
|
};
|
|
5495
|
-
|
|
5496
|
-
interface NumberBaseColumn extends ColumnType<number, typeof Operators.number>, NumberMethods {
|
|
5249
|
+
interface NumberBaseColumn extends ColumnType<number, typeof Operators.number>, NumberTypeMethods {
|
|
5497
5250
|
}
|
|
5498
5251
|
declare abstract class NumberBaseColumn extends ColumnType<number, typeof Operators.number> {
|
|
5499
5252
|
data: NumberColumnData;
|
|
@@ -5842,39 +5595,24 @@ declare const simplifyColumnDefault: (value?: string) => RawSQL<ColumnTypeBase<u
|
|
|
5842
5595
|
tsquery(): TsQueryColumn;
|
|
5843
5596
|
uuid(): UUIDColumn;
|
|
5844
5597
|
xml(): XMLColumn;
|
|
5845
|
-
json<Type extends orchid_core.
|
|
5846
|
-
|
|
5847
|
-
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>;
|
|
5848
|
-
union: <T_6 extends [orchid_core.JSONTypeAny, orchid_core.JSONTypeAny, ...orchid_core.JSONTypeAny[]]>(types: T_6) => orchid_core.JSONUnion<T_6>;
|
|
5849
|
-
any: () => orchid_core.JSONAny;
|
|
5850
|
-
bigint: () => orchid_core.JSONBigInt;
|
|
5598
|
+
json<Type extends orchid_core.JSONType<unknown, {}> = orchid_core.JSONUnknown>(schemaOrFn?: Type | ((j: {
|
|
5599
|
+
unknown: () => orchid_core.JSONUnknown;
|
|
5851
5600
|
boolean: () => orchid_core.JSONBoolean;
|
|
5852
|
-
date: () => orchid_core.JSONDate;
|
|
5853
|
-
nan: () => orchid_core.JSONNaN;
|
|
5854
|
-
never: () => orchid_core.JSONNever;
|
|
5855
5601
|
null: () => orchid_core.JSONNull;
|
|
5856
5602
|
number: () => orchid_core.JSONNumber;
|
|
5857
5603
|
string: () => orchid_core.JSONString;
|
|
5858
|
-
unknown:
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
intersection: <Left extends orchid_core.
|
|
5864
|
-
lazy: <
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
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) & {
|
|
5871
|
-
[k: string]: Catchall["type"];
|
|
5872
|
-
} 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) & {
|
|
5873
|
-
[k: string]: Catchall["type"];
|
|
5874
|
-
})[k_2]; } : never>;
|
|
5875
|
-
optional: <T_19 extends orchid_core.JSONTypeAny>(type: T_19) => orchid_core.JSONOptional<T_19>;
|
|
5876
|
-
record: typeof orchid_core.record;
|
|
5877
|
-
}) => Type)): JSONColumn<Type>;
|
|
5604
|
+
array: <T_5 extends orchid_core.JSONType<unknown, {}>>(item: T_5) => orchid_core.JSONArray<T_5, "many">;
|
|
5605
|
+
object: <Shape extends orchid_core.JSONObjectShape>(shape: Shape) => orchid_core.JSONObject<Shape, "strip", orchid_core.JSONType<unknown, {}>>;
|
|
5606
|
+
literal: <T_6 extends orchid_core.JSONPrimitive>(value: T_6) => orchid_core.JSONLiteral<T_6>;
|
|
5607
|
+
discriminatedUnion: <Discriminator extends string, Types extends orchid_core.JSONDiscriminatedUnionArg<Discriminator>>(discriminator: Discriminator, types: Types) => orchid_core.JSONDiscriminatedUnion<Discriminator, Types>;
|
|
5608
|
+
enum: <U_1 extends string, T_7 extends [U_1, ...U_1[]]>(options: T_7) => orchid_core.JSONEnum<string, T_7>;
|
|
5609
|
+
intersection: <Left extends orchid_core.JSONType<unknown, {}>, Right extends orchid_core.JSONType<unknown, {}>>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
5610
|
+
lazy: <T_8 extends orchid_core.JSONType<unknown, {}>>(fn: () => T_8) => orchid_core.JSONLazy<T_8>;
|
|
5611
|
+
nativeEnum: <T_9 extends orchid_core.EnumLike>(type: T_9) => orchid_core.JSONNativeEnum<T_9>;
|
|
5612
|
+
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>;
|
|
5613
|
+
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>;
|
|
5614
|
+
union: <T_11 extends orchid_core.JSONUnionArgs>(...types: T_11) => orchid_core.JSONUnion<T_11>;
|
|
5615
|
+
}) => Type) | undefined): JSONColumn<Type>;
|
|
5878
5616
|
jsonText(): JSONTextColumn;
|
|
5879
5617
|
array<Item extends ColumnType<unknown, BaseOperators, unknown>>(item: Item): ArrayColumn<Item>;
|
|
5880
5618
|
type(dataType: string): CustomTypeColumn;
|
|
@@ -5966,7 +5704,7 @@ declare abstract class ColumnType<Type = unknown, Ops extends BaseOperators = Ba
|
|
|
5966
5704
|
type: Transformed;
|
|
5967
5705
|
};
|
|
5968
5706
|
to<T extends ColumnType, ToType extends ColumnType>(this: T, fn: (input: T['type']) => ToType['type'] | undefined, type: ToType): ToType;
|
|
5969
|
-
refine<T extends ColumnType, RefinedOutput extends T['type']>(this: T, check: (arg: T['type']) => unknown, params?:
|
|
5707
|
+
refine<T extends ColumnType, RefinedOutput extends T['type']>(this: T, check: (arg: T['type']) => unknown, params?: ErrorMessage): T & {
|
|
5970
5708
|
type: RefinedOutput;
|
|
5971
5709
|
};
|
|
5972
5710
|
superRefine<T extends ColumnType, RefinedOutput extends T['type']>(this: T, check: (arg: T['type'], ctx: ValidationContext) => unknown): T & {
|
|
@@ -5990,20 +5728,6 @@ declare abstract class ColumnType<Type = unknown, Ops extends BaseOperators = Ba
|
|
|
5990
5728
|
generated<T extends ColumnType>(this: T, ...args: RawSQLArgs): T;
|
|
5991
5729
|
}
|
|
5992
5730
|
|
|
5993
|
-
declare const cloneInstance: <T>(instance: T) => T;
|
|
5994
|
-
declare const assignMethodsToClass: <Methods extends Record<string, unknown>>(klass: {
|
|
5995
|
-
prototype: unknown;
|
|
5996
|
-
}, methods: Methods) => void;
|
|
5997
|
-
|
|
5998
|
-
declare const utils_assignMethodsToClass: typeof assignMethodsToClass;
|
|
5999
|
-
declare const utils_cloneInstance: typeof cloneInstance;
|
|
6000
|
-
declare namespace utils {
|
|
6001
|
-
export {
|
|
6002
|
-
utils_assignMethodsToClass as assignMethodsToClass,
|
|
6003
|
-
utils_cloneInstance as cloneInstance,
|
|
6004
|
-
};
|
|
6005
|
-
}
|
|
6006
|
-
|
|
6007
5731
|
declare abstract class VirtualColumn extends ColumnType<unknown, typeof Operators.any> {
|
|
6008
5732
|
dataType: string;
|
|
6009
5733
|
operators: {
|
|
@@ -6089,4 +5813,4 @@ declare const testTransaction: {
|
|
|
6089
5813
|
close(arg: Arg): Promise<void>;
|
|
6090
5814
|
};
|
|
6091
5815
|
|
|
6092
|
-
export { Adapter, AdapterConfig, AdapterOptions, AddQuerySelect, AddQueryWith, AfterHook, AggregateMethods, AggregateOptions, AliasOrTable, ArrayColumn, ArrayData, ArrayOfColumnsObjects, AsMethods, BaseOperators, BaseRelation, BelongsToRelation, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BooleanNullable, BoxColumn, ByteaColumn, CharColumn, CidrColumn, CircleColumn, CitextColumn, Clear, ClearStatement, ColumnData, ColumnExpression, ColumnFromDbParams, ColumnInfo, ColumnInfoMethods, ColumnInfoQueryData, ColumnOperators, ColumnType, ColumnTypes, ColumnsObject, ColumnsShape, CommonQueryData, CopyMethods, CopyOptions, CopyQueryData, Create, CreateCtx, CreateData, CreateKind, CreateMethodsNames, CustomTypeColumn, DateBaseColumn, DateColumn, DateTimeBaseClass, DateTimeTzBaseClass, Db, DbOptions, DbResult, DbTableOptions, DecimalBaseColumn, DecimalColumn, DefaultColumnTypes, Delete, DeleteMethodsNames, DeleteQueryData, DomainColumn, DoublePrecisionColumn, DropMode, EnumColumn, ExpressionOutput, FnExpression, FnExpressionArg, For, ForeignKey, ForeignKeyAction, ForeignKeyMatch, ForeignKeyOptions, From, FromArgs, FromResult, GetArg, GetQueryResult, GetStringArg, HasAndBelongsToManyRelation, HasManyRelation, HasOneRelation, Having, HavingItem, HookAction, HookSelect, IdentityColumn, IndexColumnOptions, IndexOptions, InetColumn, InsertQueryData, IntegerBaseColumn, IntegerColumn, IntervalColumn, IsolationLevel, JSONColumn, JSONTextColumn,
|
|
5816
|
+
export { Adapter, AdapterConfig, AdapterOptions, AddQuerySelect, AddQueryWith, AfterHook, AggregateMethods, AggregateOptions, AliasOrTable, ArrayColumn, ArrayData, ArrayOfColumnsObjects, AsMethods, BaseOperators, BaseRelation, BelongsToRelation, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BooleanNullable, BoxColumn, ByteaColumn, CharColumn, CidrColumn, CircleColumn, CitextColumn, Clear, ClearStatement, ColumnData, ColumnExpression, ColumnFromDbParams, ColumnInfo, ColumnInfoMethods, ColumnInfoQueryData, ColumnOperators, ColumnType, ColumnTypes, ColumnsObject, ColumnsShape, CommonQueryData, CopyMethods, CopyOptions, CopyQueryData, Create, CreateCtx, CreateData, CreateKind, CreateMethodsNames, CustomTypeColumn, DateBaseColumn, DateColumn, DateTimeBaseClass, DateTimeTzBaseClass, Db, DbOptions, DbResult, DbTableOptions, DecimalBaseColumn, DecimalColumn, DefaultColumnTypes, Delete, DeleteMethodsNames, DeleteQueryData, DomainColumn, DoublePrecisionColumn, DropMode, EnumColumn, ExpressionOutput, FnExpression, FnExpressionArg, For, ForeignKey, ForeignKeyAction, ForeignKeyMatch, ForeignKeyOptions, From, FromArgs, FromResult, GetArg, GetQueryResult, GetStringArg, HasAndBelongsToManyRelation, HasManyRelation, HasOneRelation, Having, HavingItem, HookAction, HookSelect, IdentityColumn, IndexColumnOptions, IndexOptions, InetColumn, InsertQueryData, IntegerBaseColumn, IntegerColumn, IntervalColumn, IsolationLevel, JSONColumn, JSONTextColumn, Join, JoinArgs, JoinCallback, JoinFirstArg, JoinItem, JoinLateralCallback, JoinLateralItem, JoinLateralResult, JoinOverrides, JoinResult, JoinedParsers, JoinedShapes, JsonItem, JsonMethods, JsonModifiers, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, MergeQuery, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, NoPrimaryKeyOption, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, NumberColumn, NumberColumnData, OnConflictItem, OnConflictMergeUpdate, OnConflictQueryBuilder, OnQueryBuilder, Operator, Operators, OrchidOrmError, OrchidOrmInternalError, OrderArg, OrderArgs, OrderItem, OrderTsQueryConfig, Over, PathColumn, PluckResultColumnType, PointColumn, PolygonColumn, Query, QueryAfterHook, QueryArraysResult, QueryBase, QueryBeforeHook, QueryData, QueryError, QueryErrorName, QueryGet, QueryHookSelect, QueryHooks, QueryLog, QueryLogObject, QueryLogOptions, QueryLogger, QueryMethods, QueryResult, QueryReturnType, QueryReturnsAll, QuerySourceItem, QueryTransform, QueryTransformFn, QueryUpsertOrCreate, QueryWithTable, RawSQL, RawSqlMethods, RealColumn, Relation, RelationQuery, RelationQueryBase, RelationQueryData, RelationsBase, SearchArg, SearchMethods, SearchWeight, Select, SelectAggMethods, SelectArg, SelectItem, SelectQueryBuilder, SelectQueryData, Selectable, SelectableBase, SelectableFromShape, SelectableOfType, SelectableOrExpression, SelectableOrExpressionOfType, SerialColumn, SerialColumnData, SetQueryReturns, SetQueryReturnsAll, SetQueryReturnsColumn, SetQueryReturnsColumnInfo, SetQueryReturnsColumnOptional, SetQueryReturnsOne, SetQueryReturnsOneOptional, SetQueryReturnsPluck, SetQueryReturnsRowCount, SetQueryReturnsRows, SetQueryReturnsValue, SetQueryReturnsValueOptional, SetQueryReturnsVoid, SetQueryTableAlias, SetQueryWith, SimpleJoinItem, SingleColumnIndexOptions, SmallIntColumn, SmallSerialColumn, SortDir, StringColumn, TableData, TextBaseColumn, TextColumn, TextColumnData, Then, TimeColumn, TimeInterval, TimestampColumn, TimestampTZColumn, ToSqlCtx, ToSqlOptions, Transaction, TransactionAdapter, TransactionOptions, TransformMethods, TruncateQueryData, TsQueryColumn, TsVectorColumn, TypeParsers, UUIDColumn, UnhandledTypeError, Union, UnionArg, UnionItem, UnionKind, UnknownColumn, Update, UpdateCtx, UpdateData, UpdateQueryData, UpdateQueryDataItem, UpdateQueryDataObject, UpdatedAtDataInjector, UpsertCreateArg, UpsertData, UpsertResult, UpsertThis, VarCharColumn, VirtualColumn, Where, WhereArg, WhereArgs, WhereInArg, WhereInColumn, WhereInItem, WhereInValues, WhereItem, WhereJsonPathEqualsItem, WhereOnItem, WhereOnJoinItem, WhereQueryBuilder, WhereResult, WhereSearchItem, WhereSearchResult, WindowArg, WindowArgDeclaration, WindowDeclaration, WindowItem, With, WithDataBase, WithDataItem, WithItem, WithOptions, XMLColumn, addOr, addOrNot, addParserForRawExpression, addParserForSelectItem, addQueryOn, addQueryOrOn, addWhere, addWhereIn, addWhereNot, anyShape, checkIfASimpleQuery, cloneQueryArrays, columnCheckToCode, columnCode, columnForeignKeysToCode, columnIndexesToCode, columnTypes, columnsByType, columnsShapeToCode, constraintPropsToCode, constraintToCode, createDb, createOperator, foreignKeyArgumentToCode, getClonedQueryData, getColumnTypes, getConstraintKind, getQueryAs, getSelectQueryBuilder, getShapeFromSelect, getTableData, handleResult, identityToCode, indexToCode, instantiateColumn, isQueryReturnsAll, isRequiredRelationKey, isSelectingCount, joinSubQuery, logColors, logParamToLogObject, makeColumnFn, makeColumnFnClass, makeRegexToFindInSql, makeSql, newTableData, parseRecord, parseResult, primaryKeyToCode, processSelectArg, pushQueryArray, pushQueryOn, pushQueryOrOn, pushQueryValue, queryMethodByReturnType, queryTypeWithLimitOne, quote, quoteString, raw, referencesArgsToCode, relationQueryKey, resetTableData, resolveSubQueryCallback, saveSearchAlias, setQueryObjectValue, simplifyColumnDefault, templateLiteralToSQL, testTransaction, throwIfNoWhere, toSql, toSqlCacheKey };
|