rake-db 2.3.45 → 2.4.1
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 +241 -239
- package/dist/index.js +34 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as pqb from 'pqb';
|
|
2
|
-
import {
|
|
2
|
+
import { ColumnType, EnumColumn, ColumnTypes, ColumnsShape, DbResult, DefaultColumnTypes, TransactionAdapter, AdapterOptions, TextColumn, IndexColumnOptions, IndexOptions, ForeignKeyOptions, QueryLogObject, NoPrimaryKeyOption, TableData, SingleColumnIndexOptions, QueryLogOptions } from 'pqb';
|
|
3
|
+
import * as orchid_core from 'orchid-core';
|
|
4
|
+
import { EmptyObject, RawExpression, raw, MaybeArray } from 'orchid-core';
|
|
3
5
|
|
|
4
6
|
declare function add(item: ColumnType, options?: {
|
|
5
7
|
dropMode?: DropMode;
|
|
@@ -23,7 +25,7 @@ declare const tableChangeMethods: {
|
|
|
23
25
|
nonNullable(): Change;
|
|
24
26
|
comment(comment: string | null): Change;
|
|
25
27
|
rename(name: string): RakeDbAst.ChangeTableItem.Rename;
|
|
26
|
-
enum(this:
|
|
28
|
+
enum(this: orchid_core.ColumnTypesBase, name: string): EnumColumn<string, [string, ...string[]]>;
|
|
27
29
|
};
|
|
28
30
|
declare type TableChanger = MigrationColumnTypes & TableChangeMethods;
|
|
29
31
|
declare type TableChangeData = Record<string, RakeDbAst.ChangeTableItem.Column | RakeDbAst.ChangeTableItem.Rename | Change | EmptyObject>;
|
|
@@ -58,91 +60,91 @@ declare type JoinTableOptions = {
|
|
|
58
60
|
};
|
|
59
61
|
declare type Migration = DbResult<DefaultColumnTypes> & MigrationBase;
|
|
60
62
|
declare const createMigrationInterface: (tx: TransactionAdapter, up: boolean, options: RakeDbConfig, adapterOptions: AdapterOptions, appCodeUpdaterCache: object) => pqb.Db<string, Record<string, never>, pqb.RelationsBase, {
|
|
61
|
-
name: typeof
|
|
62
|
-
raw: (sql: string, values?: false | Record<string, unknown> | undefined) =>
|
|
63
|
-
smallint(this:
|
|
64
|
-
integer(this:
|
|
65
|
-
bigint(this:
|
|
66
|
-
numeric<Precision extends number | undefined = undefined, Scale extends number | undefined = undefined>(this:
|
|
67
|
-
decimal<Precision_1 extends number | undefined = undefined, Scale_1 extends number | undefined = undefined>(this:
|
|
68
|
-
real(this:
|
|
69
|
-
doublePrecision(this:
|
|
70
|
-
smallSerial(this:
|
|
71
|
-
serial(this:
|
|
72
|
-
bigSerial(this:
|
|
73
|
-
money(this:
|
|
74
|
-
varchar<Limit extends number | undefined = undefined>(this:
|
|
75
|
-
char<Limit_1 extends number | undefined = undefined>(this:
|
|
76
|
-
text: (this:
|
|
77
|
-
string: (this:
|
|
78
|
-
bytea(this:
|
|
79
|
-
date(this:
|
|
80
|
-
timestamp<Precision_2 extends number>(this:
|
|
81
|
-
timestampWithTimeZone<Precision_3 extends number | undefined = undefined>(this:
|
|
82
|
-
time<Precision_4 extends number | undefined = undefined>(this:
|
|
83
|
-
timeWithTimeZone<Precision_5 extends number | undefined = undefined>(this:
|
|
84
|
-
interval<Fields extends string | undefined = undefined, Precision_6 extends number | undefined = undefined>(this:
|
|
85
|
-
boolean(this:
|
|
86
|
-
enum<U extends string, T extends [U, ...U[]]>(this:
|
|
87
|
-
point(this:
|
|
88
|
-
line(this:
|
|
89
|
-
lseg(this:
|
|
90
|
-
box(this:
|
|
91
|
-
path(this:
|
|
92
|
-
polygon(this:
|
|
93
|
-
circle(this:
|
|
94
|
-
cidr(this:
|
|
95
|
-
inet(this:
|
|
96
|
-
macaddr(this:
|
|
97
|
-
macaddr8(this:
|
|
98
|
-
bit<Length extends number>(this:
|
|
99
|
-
bitVarying<Length_1 extends number | undefined = undefined>(this:
|
|
100
|
-
tsvector(this:
|
|
101
|
-
tsquery(this:
|
|
102
|
-
uuid(this:
|
|
103
|
-
xml(this:
|
|
104
|
-
json<Type extends
|
|
105
|
-
set: <Value extends
|
|
106
|
-
tuple: <T_1 extends [] |
|
|
107
|
-
union: <T_2 extends [
|
|
108
|
-
any: () =>
|
|
109
|
-
bigint: () =>
|
|
110
|
-
boolean: () =>
|
|
111
|
-
date: () =>
|
|
112
|
-
nan: () =>
|
|
113
|
-
never: () =>
|
|
114
|
-
null: () =>
|
|
115
|
-
number: () =>
|
|
116
|
-
string: () =>
|
|
117
|
-
undefined: () =>
|
|
118
|
-
unknown: () =>
|
|
119
|
-
void: () =>
|
|
120
|
-
array: <Type_1 extends
|
|
121
|
-
discriminatedUnion: <Discriminator extends string, DiscriminatorValue extends
|
|
122
|
-
enum: <U_1 extends string, T_3 extends [U_1, ...U_1[]]>(options: T_3) =>
|
|
123
|
-
instanceOf: <T_4 extends new (...args: any[]) => any>(cls: T_4) =>
|
|
124
|
-
intersection: <Left extends
|
|
125
|
-
lazy: <T_5 extends
|
|
126
|
-
literal: <T_6 extends
|
|
127
|
-
map: <Key extends
|
|
128
|
-
nativeEnum: <T_7 extends
|
|
129
|
-
nullable: <T_8 extends
|
|
130
|
-
nullish: <T_9 extends
|
|
131
|
-
object: <T_10 extends
|
|
63
|
+
name: typeof orchid_core.name;
|
|
64
|
+
raw: (sql: string, values?: false | Record<string, unknown> | undefined) => orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>;
|
|
65
|
+
smallint(this: orchid_core.ColumnTypesBase): pqb.SmallIntColumn;
|
|
66
|
+
integer(this: orchid_core.ColumnTypesBase): pqb.IntegerColumn;
|
|
67
|
+
bigint(this: orchid_core.ColumnTypesBase): pqb.BigIntColumn;
|
|
68
|
+
numeric<Precision extends number | undefined = undefined, Scale extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision | undefined, scale?: Scale | undefined): pqb.DecimalColumn<Precision, Scale>;
|
|
69
|
+
decimal<Precision_1 extends number | undefined = undefined, Scale_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_1 | undefined, scale?: Scale_1 | undefined): pqb.DecimalColumn<Precision_1, Scale_1>;
|
|
70
|
+
real(this: orchid_core.ColumnTypesBase): pqb.RealColumn;
|
|
71
|
+
doublePrecision(this: orchid_core.ColumnTypesBase): pqb.DoublePrecisionColumn;
|
|
72
|
+
smallSerial(this: orchid_core.ColumnTypesBase): pqb.SmallSerialColumn;
|
|
73
|
+
serial(this: orchid_core.ColumnTypesBase): pqb.SerialColumn;
|
|
74
|
+
bigSerial(this: orchid_core.ColumnTypesBase): pqb.BigSerialColumn;
|
|
75
|
+
money(this: orchid_core.ColumnTypesBase): pqb.MoneyColumn;
|
|
76
|
+
varchar<Limit extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, limit?: Limit | undefined): pqb.VarCharColumn<Limit>;
|
|
77
|
+
char<Limit_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, limit?: Limit_1 | undefined): pqb.CharColumn<Limit_1>;
|
|
78
|
+
text: (this: orchid_core.ColumnTypesBase, min: number, max: number) => TextColumn;
|
|
79
|
+
string: (this: orchid_core.ColumnTypesBase, min: number, max: number) => TextColumn;
|
|
80
|
+
bytea(this: orchid_core.ColumnTypesBase): pqb.ByteaColumn;
|
|
81
|
+
date(this: orchid_core.ColumnTypesBase): pqb.DateColumn;
|
|
82
|
+
timestamp<Precision_2 extends number>(this: orchid_core.ColumnTypesBase, precision?: Precision_2 | undefined): pqb.TimestampColumn<Precision_2>;
|
|
83
|
+
timestampWithTimeZone<Precision_3 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_3 | undefined): pqb.TimestampWithTimeZoneColumn<number>;
|
|
84
|
+
time<Precision_4 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_4 | undefined): pqb.TimeColumn<Precision_4>;
|
|
85
|
+
timeWithTimeZone<Precision_5 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_5 | undefined): pqb.TimeWithTimeZoneColumn<Precision_5>;
|
|
86
|
+
interval<Fields extends string | undefined = undefined, Precision_6 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, fields?: Fields | undefined, precision?: Precision_6 | undefined): pqb.IntervalColumn<Fields, Precision_6>;
|
|
87
|
+
boolean(this: orchid_core.ColumnTypesBase): pqb.BooleanColumn;
|
|
88
|
+
enum<U extends string, T extends [U, ...U[]]>(this: orchid_core.ColumnTypesBase, dataType: string, type: T): EnumColumn<U, T>;
|
|
89
|
+
point(this: orchid_core.ColumnTypesBase): pqb.PointColumn;
|
|
90
|
+
line(this: orchid_core.ColumnTypesBase): pqb.LineColumn;
|
|
91
|
+
lseg(this: orchid_core.ColumnTypesBase): pqb.LsegColumn;
|
|
92
|
+
box(this: orchid_core.ColumnTypesBase): pqb.BoxColumn;
|
|
93
|
+
path(this: orchid_core.ColumnTypesBase): pqb.PathColumn;
|
|
94
|
+
polygon(this: orchid_core.ColumnTypesBase): pqb.PolygonColumn;
|
|
95
|
+
circle(this: orchid_core.ColumnTypesBase): pqb.CircleColumn;
|
|
96
|
+
cidr(this: orchid_core.ColumnTypesBase): pqb.CidrColumn;
|
|
97
|
+
inet(this: orchid_core.ColumnTypesBase): pqb.InetColumn;
|
|
98
|
+
macaddr(this: orchid_core.ColumnTypesBase): pqb.MacAddrColumn;
|
|
99
|
+
macaddr8(this: orchid_core.ColumnTypesBase): pqb.MacAddr8Column;
|
|
100
|
+
bit<Length extends number>(this: orchid_core.ColumnTypesBase, length: Length): pqb.BitColumn<Length>;
|
|
101
|
+
bitVarying<Length_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, length?: Length_1 | undefined): pqb.BitVaryingColumn<Length_1>;
|
|
102
|
+
tsvector(this: orchid_core.ColumnTypesBase): pqb.TsVectorColumn;
|
|
103
|
+
tsquery(this: orchid_core.ColumnTypesBase): pqb.TsQueryColumn;
|
|
104
|
+
uuid(this: orchid_core.ColumnTypesBase): pqb.UUIDColumn;
|
|
105
|
+
xml(this: orchid_core.ColumnTypesBase): pqb.XMLColumn;
|
|
106
|
+
json<Type extends orchid_core.JSONTypeAny>(this: orchid_core.ColumnTypesBase, schemaOrFn: Type | ((j: {
|
|
107
|
+
set: <Value extends orchid_core.JSONTypeAny>(valueType: Value) => orchid_core.JSONSet<Value>;
|
|
108
|
+
tuple: <T_1 extends [] | orchid_core.JSONTupleItems, Rest extends orchid_core.JSONTypeAny | null = null>(items: T_1, rest?: Rest) => orchid_core.JSONTuple<T_1, Rest>;
|
|
109
|
+
union: <T_2 extends [orchid_core.JSONTypeAny, orchid_core.JSONTypeAny, ...orchid_core.JSONTypeAny[]]>(types: T_2) => orchid_core.JSONUnion<T_2>;
|
|
110
|
+
any: () => orchid_core.JSONAny;
|
|
111
|
+
bigint: () => orchid_core.JSONBigInt;
|
|
112
|
+
boolean: () => orchid_core.JSONBoolean;
|
|
113
|
+
date: () => orchid_core.JSONDate;
|
|
114
|
+
nan: () => orchid_core.JSONNaN;
|
|
115
|
+
never: () => orchid_core.JSONNever;
|
|
116
|
+
null: () => orchid_core.JSONNull;
|
|
117
|
+
number: () => orchid_core.JSONNumber;
|
|
118
|
+
string: () => orchid_core.JSONString;
|
|
119
|
+
undefined: () => orchid_core.JSONUndefined;
|
|
120
|
+
unknown: () => orchid_core.JSONUnknown;
|
|
121
|
+
void: () => orchid_core.JSONVoid;
|
|
122
|
+
array: <Type_1 extends orchid_core.JSONTypeAny>(element: Type_1) => orchid_core.JSONArray<Type_1, "many">;
|
|
123
|
+
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[number]>;
|
|
124
|
+
enum: <U_1 extends string, T_3 extends [U_1, ...U_1[]]>(options: T_3) => orchid_core.JSONEnum<U_1, T_3>;
|
|
125
|
+
instanceOf: <T_4 extends new (...args: any[]) => any>(cls: T_4) => orchid_core.JSONInstanceOf<T_4>;
|
|
126
|
+
intersection: <Left extends orchid_core.JSONTypeAny, Right extends orchid_core.JSONTypeAny>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
127
|
+
lazy: <T_5 extends orchid_core.JSONTypeAny>(fn: () => T_5) => orchid_core.JSONLazy<T_5>;
|
|
128
|
+
literal: <T_6 extends orchid_core.Primitive>(value: T_6) => orchid_core.JSONLiteral<T_6>;
|
|
129
|
+
map: <Key extends orchid_core.JSONTypeAny, Value_1 extends orchid_core.JSONTypeAny>(keyType: Key, valueType: Value_1) => orchid_core.JSONMap<Key, Value_1>;
|
|
130
|
+
nativeEnum: <T_7 extends orchid_core.EnumLike>(givenEnum: T_7) => orchid_core.JSONNativeEnum<T_7>;
|
|
131
|
+
nullable: <T_8 extends orchid_core.JSONTypeAny>(type: T_8) => orchid_core.JSONNullable<T_8>;
|
|
132
|
+
nullish: <T_9 extends orchid_core.JSONTypeAny>(type: T_9) => orchid_core.JSONNullish<T_9>;
|
|
133
|
+
object: <T_10 extends orchid_core.JSONObjectShape, UnknownKeys extends orchid_core.UnknownKeysParam = "strip", Catchall extends orchid_core.JSONTypeAny = orchid_core.JSONTypeAny>(shape: T_10) => orchid_core.JSONObject<T_10, UnknownKeys, Catchall, orchid_core.JSONTypeAny extends Catchall ? orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never : (orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never) & {
|
|
132
134
|
[k: string]: Catchall["type"];
|
|
133
|
-
} extends infer T_12 extends object ? { [k_2 in keyof T_12]: ((
|
|
135
|
+
} extends infer T_12 extends object ? { [k_2 in keyof T_12]: ((orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never) & {
|
|
134
136
|
[k: string]: Catchall["type"];
|
|
135
137
|
})[k_2]; } : never>;
|
|
136
|
-
optional: <T_13 extends
|
|
137
|
-
record: typeof
|
|
138
|
+
optional: <T_13 extends orchid_core.JSONTypeAny>(type: T_13) => orchid_core.JSONOptional<T_13>;
|
|
139
|
+
record: typeof orchid_core.record;
|
|
138
140
|
}) => Type)): pqb.JSONColumn<Type>;
|
|
139
|
-
jsonText(this:
|
|
140
|
-
array<Item extends ColumnType<unknown,
|
|
141
|
-
timestamps: <T_14 extends ColumnType<unknown,
|
|
141
|
+
jsonText(this: orchid_core.ColumnTypesBase): pqb.JSONTextColumn;
|
|
142
|
+
array<Item extends ColumnType<unknown, orchid_core.BaseOperators, unknown>>(this: orchid_core.ColumnTypesBase, item: Item): pqb.ArrayColumn<Item>;
|
|
143
|
+
timestamps: <T_14 extends ColumnType<unknown, orchid_core.BaseOperators, unknown>>(this: {
|
|
142
144
|
timestamp(): T_14;
|
|
143
145
|
}) => {
|
|
144
|
-
createdAt:
|
|
145
|
-
updatedAt:
|
|
146
|
+
createdAt: orchid_core.ColumnWithDefault<T_14, orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>>;
|
|
147
|
+
updatedAt: orchid_core.ColumnWithDefault<T_14, orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>>;
|
|
146
148
|
};
|
|
147
149
|
primaryKey(columns: string[], options?: {
|
|
148
150
|
name?: string | undefined;
|
|
@@ -155,91 +157,91 @@ declare const createMigrationInterface: (tx: TransactionAdapter, up: boolean, op
|
|
|
155
157
|
};
|
|
156
158
|
}> & {
|
|
157
159
|
<Table_2 extends string, Shape extends ColumnsShape = ColumnsShape>(table: Table_2, shape?: Shape | ((t: {
|
|
158
|
-
name: typeof
|
|
159
|
-
raw: (sql: string, values?: false | Record<string, unknown> | undefined) =>
|
|
160
|
-
smallint(this:
|
|
161
|
-
integer(this:
|
|
162
|
-
bigint(this:
|
|
163
|
-
numeric<Precision extends number | undefined = undefined, Scale extends number | undefined = undefined>(this:
|
|
164
|
-
decimal<Precision_1 extends number | undefined = undefined, Scale_1 extends number | undefined = undefined>(this:
|
|
165
|
-
real(this:
|
|
166
|
-
doublePrecision(this:
|
|
167
|
-
smallSerial(this:
|
|
168
|
-
serial(this:
|
|
169
|
-
bigSerial(this:
|
|
170
|
-
money(this:
|
|
171
|
-
varchar<Limit extends number | undefined = undefined>(this:
|
|
172
|
-
char<Limit_1 extends number | undefined = undefined>(this:
|
|
173
|
-
text: (this:
|
|
174
|
-
string: (this:
|
|
175
|
-
bytea(this:
|
|
176
|
-
date(this:
|
|
177
|
-
timestamp<Precision_2 extends number>(this:
|
|
178
|
-
timestampWithTimeZone<Precision_3 extends number | undefined = undefined>(this:
|
|
179
|
-
time<Precision_4 extends number | undefined = undefined>(this:
|
|
180
|
-
timeWithTimeZone<Precision_5 extends number | undefined = undefined>(this:
|
|
181
|
-
interval<Fields extends string | undefined = undefined, Precision_6 extends number | undefined = undefined>(this:
|
|
182
|
-
boolean(this:
|
|
183
|
-
enum<U extends string, T extends [U, ...U[]]>(this:
|
|
184
|
-
point(this:
|
|
185
|
-
line(this:
|
|
186
|
-
lseg(this:
|
|
187
|
-
box(this:
|
|
188
|
-
path(this:
|
|
189
|
-
polygon(this:
|
|
190
|
-
circle(this:
|
|
191
|
-
cidr(this:
|
|
192
|
-
inet(this:
|
|
193
|
-
macaddr(this:
|
|
194
|
-
macaddr8(this:
|
|
195
|
-
bit<Length extends number>(this:
|
|
196
|
-
bitVarying<Length_1 extends number | undefined = undefined>(this:
|
|
197
|
-
tsvector(this:
|
|
198
|
-
tsquery(this:
|
|
199
|
-
uuid(this:
|
|
200
|
-
xml(this:
|
|
201
|
-
json<Type extends
|
|
202
|
-
set: <Value extends
|
|
203
|
-
tuple: <T_1 extends [] |
|
|
204
|
-
union: <T_2 extends [
|
|
205
|
-
any: () =>
|
|
206
|
-
bigint: () =>
|
|
207
|
-
boolean: () =>
|
|
208
|
-
date: () =>
|
|
209
|
-
nan: () =>
|
|
210
|
-
never: () =>
|
|
211
|
-
null: () =>
|
|
212
|
-
number: () =>
|
|
213
|
-
string: () =>
|
|
214
|
-
undefined: () =>
|
|
215
|
-
unknown: () =>
|
|
216
|
-
void: () =>
|
|
217
|
-
array: <Type_1 extends
|
|
218
|
-
discriminatedUnion: <Discriminator extends string, DiscriminatorValue extends
|
|
219
|
-
enum: <U_1 extends string, T_3 extends [U_1, ...U_1[]]>(options: T_3) =>
|
|
220
|
-
instanceOf: <T_4 extends new (...args: any[]) => any>(cls: T_4) =>
|
|
221
|
-
intersection: <Left extends
|
|
222
|
-
lazy: <T_5 extends
|
|
223
|
-
literal: <T_6 extends
|
|
224
|
-
map: <Key extends
|
|
225
|
-
nativeEnum: <T_7 extends
|
|
226
|
-
nullable: <T_8 extends
|
|
227
|
-
nullish: <T_9 extends
|
|
228
|
-
object: <T_10 extends
|
|
160
|
+
name: typeof orchid_core.name;
|
|
161
|
+
raw: (sql: string, values?: false | Record<string, unknown> | undefined) => orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>;
|
|
162
|
+
smallint(this: orchid_core.ColumnTypesBase): pqb.SmallIntColumn;
|
|
163
|
+
integer(this: orchid_core.ColumnTypesBase): pqb.IntegerColumn;
|
|
164
|
+
bigint(this: orchid_core.ColumnTypesBase): pqb.BigIntColumn;
|
|
165
|
+
numeric<Precision extends number | undefined = undefined, Scale extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision | undefined, scale?: Scale | undefined): pqb.DecimalColumn<Precision, Scale>;
|
|
166
|
+
decimal<Precision_1 extends number | undefined = undefined, Scale_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_1 | undefined, scale?: Scale_1 | undefined): pqb.DecimalColumn<Precision_1, Scale_1>;
|
|
167
|
+
real(this: orchid_core.ColumnTypesBase): pqb.RealColumn;
|
|
168
|
+
doublePrecision(this: orchid_core.ColumnTypesBase): pqb.DoublePrecisionColumn;
|
|
169
|
+
smallSerial(this: orchid_core.ColumnTypesBase): pqb.SmallSerialColumn;
|
|
170
|
+
serial(this: orchid_core.ColumnTypesBase): pqb.SerialColumn;
|
|
171
|
+
bigSerial(this: orchid_core.ColumnTypesBase): pqb.BigSerialColumn;
|
|
172
|
+
money(this: orchid_core.ColumnTypesBase): pqb.MoneyColumn;
|
|
173
|
+
varchar<Limit extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, limit?: Limit | undefined): pqb.VarCharColumn<Limit>;
|
|
174
|
+
char<Limit_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, limit?: Limit_1 | undefined): pqb.CharColumn<Limit_1>;
|
|
175
|
+
text: (this: orchid_core.ColumnTypesBase, min: number, max: number) => TextColumn;
|
|
176
|
+
string: (this: orchid_core.ColumnTypesBase, min: number, max: number) => TextColumn;
|
|
177
|
+
bytea(this: orchid_core.ColumnTypesBase): pqb.ByteaColumn;
|
|
178
|
+
date(this: orchid_core.ColumnTypesBase): pqb.DateColumn;
|
|
179
|
+
timestamp<Precision_2 extends number>(this: orchid_core.ColumnTypesBase, precision?: Precision_2 | undefined): pqb.TimestampColumn<Precision_2>;
|
|
180
|
+
timestampWithTimeZone<Precision_3 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_3 | undefined): pqb.TimestampWithTimeZoneColumn<number>;
|
|
181
|
+
time<Precision_4 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_4 | undefined): pqb.TimeColumn<Precision_4>;
|
|
182
|
+
timeWithTimeZone<Precision_5 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_5 | undefined): pqb.TimeWithTimeZoneColumn<Precision_5>;
|
|
183
|
+
interval<Fields extends string | undefined = undefined, Precision_6 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, fields?: Fields | undefined, precision?: Precision_6 | undefined): pqb.IntervalColumn<Fields, Precision_6>;
|
|
184
|
+
boolean(this: orchid_core.ColumnTypesBase): pqb.BooleanColumn;
|
|
185
|
+
enum<U extends string, T extends [U, ...U[]]>(this: orchid_core.ColumnTypesBase, dataType: string, type: T): EnumColumn<U, T>;
|
|
186
|
+
point(this: orchid_core.ColumnTypesBase): pqb.PointColumn;
|
|
187
|
+
line(this: orchid_core.ColumnTypesBase): pqb.LineColumn;
|
|
188
|
+
lseg(this: orchid_core.ColumnTypesBase): pqb.LsegColumn;
|
|
189
|
+
box(this: orchid_core.ColumnTypesBase): pqb.BoxColumn;
|
|
190
|
+
path(this: orchid_core.ColumnTypesBase): pqb.PathColumn;
|
|
191
|
+
polygon(this: orchid_core.ColumnTypesBase): pqb.PolygonColumn;
|
|
192
|
+
circle(this: orchid_core.ColumnTypesBase): pqb.CircleColumn;
|
|
193
|
+
cidr(this: orchid_core.ColumnTypesBase): pqb.CidrColumn;
|
|
194
|
+
inet(this: orchid_core.ColumnTypesBase): pqb.InetColumn;
|
|
195
|
+
macaddr(this: orchid_core.ColumnTypesBase): pqb.MacAddrColumn;
|
|
196
|
+
macaddr8(this: orchid_core.ColumnTypesBase): pqb.MacAddr8Column;
|
|
197
|
+
bit<Length extends number>(this: orchid_core.ColumnTypesBase, length: Length): pqb.BitColumn<Length>;
|
|
198
|
+
bitVarying<Length_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, length?: Length_1 | undefined): pqb.BitVaryingColumn<Length_1>;
|
|
199
|
+
tsvector(this: orchid_core.ColumnTypesBase): pqb.TsVectorColumn;
|
|
200
|
+
tsquery(this: orchid_core.ColumnTypesBase): pqb.TsQueryColumn;
|
|
201
|
+
uuid(this: orchid_core.ColumnTypesBase): pqb.UUIDColumn;
|
|
202
|
+
xml(this: orchid_core.ColumnTypesBase): pqb.XMLColumn;
|
|
203
|
+
json<Type extends orchid_core.JSONTypeAny>(this: orchid_core.ColumnTypesBase, schemaOrFn: Type | ((j: {
|
|
204
|
+
set: <Value extends orchid_core.JSONTypeAny>(valueType: Value) => orchid_core.JSONSet<Value>;
|
|
205
|
+
tuple: <T_1 extends [] | orchid_core.JSONTupleItems, Rest extends orchid_core.JSONTypeAny | null = null>(items: T_1, rest?: Rest) => orchid_core.JSONTuple<T_1, Rest>;
|
|
206
|
+
union: <T_2 extends [orchid_core.JSONTypeAny, orchid_core.JSONTypeAny, ...orchid_core.JSONTypeAny[]]>(types: T_2) => orchid_core.JSONUnion<T_2>;
|
|
207
|
+
any: () => orchid_core.JSONAny;
|
|
208
|
+
bigint: () => orchid_core.JSONBigInt;
|
|
209
|
+
boolean: () => orchid_core.JSONBoolean;
|
|
210
|
+
date: () => orchid_core.JSONDate;
|
|
211
|
+
nan: () => orchid_core.JSONNaN;
|
|
212
|
+
never: () => orchid_core.JSONNever;
|
|
213
|
+
null: () => orchid_core.JSONNull;
|
|
214
|
+
number: () => orchid_core.JSONNumber;
|
|
215
|
+
string: () => orchid_core.JSONString;
|
|
216
|
+
undefined: () => orchid_core.JSONUndefined;
|
|
217
|
+
unknown: () => orchid_core.JSONUnknown;
|
|
218
|
+
void: () => orchid_core.JSONVoid;
|
|
219
|
+
array: <Type_1 extends orchid_core.JSONTypeAny>(element: Type_1) => orchid_core.JSONArray<Type_1, "many">;
|
|
220
|
+
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[number]>;
|
|
221
|
+
enum: <U_1 extends string, T_3 extends [U_1, ...U_1[]]>(options: T_3) => orchid_core.JSONEnum<U_1, T_3>;
|
|
222
|
+
instanceOf: <T_4 extends new (...args: any[]) => any>(cls: T_4) => orchid_core.JSONInstanceOf<T_4>;
|
|
223
|
+
intersection: <Left extends orchid_core.JSONTypeAny, Right extends orchid_core.JSONTypeAny>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
224
|
+
lazy: <T_5 extends orchid_core.JSONTypeAny>(fn: () => T_5) => orchid_core.JSONLazy<T_5>;
|
|
225
|
+
literal: <T_6 extends orchid_core.Primitive>(value: T_6) => orchid_core.JSONLiteral<T_6>;
|
|
226
|
+
map: <Key extends orchid_core.JSONTypeAny, Value_1 extends orchid_core.JSONTypeAny>(keyType: Key, valueType: Value_1) => orchid_core.JSONMap<Key, Value_1>;
|
|
227
|
+
nativeEnum: <T_7 extends orchid_core.EnumLike>(givenEnum: T_7) => orchid_core.JSONNativeEnum<T_7>;
|
|
228
|
+
nullable: <T_8 extends orchid_core.JSONTypeAny>(type: T_8) => orchid_core.JSONNullable<T_8>;
|
|
229
|
+
nullish: <T_9 extends orchid_core.JSONTypeAny>(type: T_9) => orchid_core.JSONNullish<T_9>;
|
|
230
|
+
object: <T_10 extends orchid_core.JSONObjectShape, UnknownKeys extends orchid_core.UnknownKeysParam = "strip", Catchall extends orchid_core.JSONTypeAny = orchid_core.JSONTypeAny>(shape: T_10) => orchid_core.JSONObject<T_10, UnknownKeys, Catchall, orchid_core.JSONTypeAny extends Catchall ? orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never : (orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never) & {
|
|
229
231
|
[k: string]: Catchall["type"];
|
|
230
|
-
} extends infer T_12 extends object ? { [k_2 in keyof T_12]: ((
|
|
232
|
+
} extends infer T_12 extends object ? { [k_2 in keyof T_12]: ((orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never) & {
|
|
231
233
|
[k: string]: Catchall["type"];
|
|
232
234
|
})[k_2]; } : never>;
|
|
233
|
-
optional: <T_13 extends
|
|
234
|
-
record: typeof
|
|
235
|
+
optional: <T_13 extends orchid_core.JSONTypeAny>(type: T_13) => orchid_core.JSONOptional<T_13>;
|
|
236
|
+
record: typeof orchid_core.record;
|
|
235
237
|
}) => Type)): pqb.JSONColumn<Type>;
|
|
236
|
-
jsonText(this:
|
|
237
|
-
array<Item extends ColumnType<unknown,
|
|
238
|
-
timestamps: <T_14 extends ColumnType<unknown,
|
|
238
|
+
jsonText(this: orchid_core.ColumnTypesBase): pqb.JSONTextColumn;
|
|
239
|
+
array<Item extends ColumnType<unknown, orchid_core.BaseOperators, unknown>>(this: orchid_core.ColumnTypesBase, item: Item): pqb.ArrayColumn<Item>;
|
|
240
|
+
timestamps: <T_14 extends ColumnType<unknown, orchid_core.BaseOperators, unknown>>(this: {
|
|
239
241
|
timestamp(): T_14;
|
|
240
242
|
}) => {
|
|
241
|
-
createdAt:
|
|
242
|
-
updatedAt:
|
|
243
|
+
createdAt: orchid_core.ColumnWithDefault<T_14, orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>>;
|
|
244
|
+
updatedAt: orchid_core.ColumnWithDefault<T_14, orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>>;
|
|
243
245
|
};
|
|
244
246
|
primaryKey(columns: string[], options?: {
|
|
245
247
|
name?: string | undefined;
|
|
@@ -251,91 +253,91 @@ declare const createMigrationInterface: (tx: TransactionAdapter, up: boolean, op
|
|
|
251
253
|
<Table_1 extends string, Columns_1 extends [string, ...string[]]>(columns: string[], table: Table_1, foreignColumns: Columns_1, options?: ForeignKeyOptions | undefined): {};
|
|
252
254
|
};
|
|
253
255
|
}) => Shape) | undefined, options?: pqb.DbTableOptions | undefined): pqb.Db<Table_2, Shape, pqb.RelationsBase, {
|
|
254
|
-
name: typeof
|
|
255
|
-
raw: (sql: string, values?: false | Record<string, unknown> | undefined) =>
|
|
256
|
-
smallint(this:
|
|
257
|
-
integer(this:
|
|
258
|
-
bigint(this:
|
|
259
|
-
numeric<Precision extends number | undefined = undefined, Scale extends number | undefined = undefined>(this:
|
|
260
|
-
decimal<Precision_1 extends number | undefined = undefined, Scale_1 extends number | undefined = undefined>(this:
|
|
261
|
-
real(this:
|
|
262
|
-
doublePrecision(this:
|
|
263
|
-
smallSerial(this:
|
|
264
|
-
serial(this:
|
|
265
|
-
bigSerial(this:
|
|
266
|
-
money(this:
|
|
267
|
-
varchar<Limit extends number | undefined = undefined>(this:
|
|
268
|
-
char<Limit_1 extends number | undefined = undefined>(this:
|
|
269
|
-
text: (this:
|
|
270
|
-
string: (this:
|
|
271
|
-
bytea(this:
|
|
272
|
-
date(this:
|
|
273
|
-
timestamp<Precision_2 extends number>(this:
|
|
274
|
-
timestampWithTimeZone<Precision_3 extends number | undefined = undefined>(this:
|
|
275
|
-
time<Precision_4 extends number | undefined = undefined>(this:
|
|
276
|
-
timeWithTimeZone<Precision_5 extends number | undefined = undefined>(this:
|
|
277
|
-
interval<Fields extends string | undefined = undefined, Precision_6 extends number | undefined = undefined>(this:
|
|
278
|
-
boolean(this:
|
|
279
|
-
enum<U extends string, T extends [U, ...U[]]>(this:
|
|
280
|
-
point(this:
|
|
281
|
-
line(this:
|
|
282
|
-
lseg(this:
|
|
283
|
-
box(this:
|
|
284
|
-
path(this:
|
|
285
|
-
polygon(this:
|
|
286
|
-
circle(this:
|
|
287
|
-
cidr(this:
|
|
288
|
-
inet(this:
|
|
289
|
-
macaddr(this:
|
|
290
|
-
macaddr8(this:
|
|
291
|
-
bit<Length extends number>(this:
|
|
292
|
-
bitVarying<Length_1 extends number | undefined = undefined>(this:
|
|
293
|
-
tsvector(this:
|
|
294
|
-
tsquery(this:
|
|
295
|
-
uuid(this:
|
|
296
|
-
xml(this:
|
|
297
|
-
json<Type extends
|
|
298
|
-
set: <Value extends
|
|
299
|
-
tuple: <T_1 extends [] |
|
|
300
|
-
union: <T_2 extends [
|
|
301
|
-
any: () =>
|
|
302
|
-
bigint: () =>
|
|
303
|
-
boolean: () =>
|
|
304
|
-
date: () =>
|
|
305
|
-
nan: () =>
|
|
306
|
-
never: () =>
|
|
307
|
-
null: () =>
|
|
308
|
-
number: () =>
|
|
309
|
-
string: () =>
|
|
310
|
-
undefined: () =>
|
|
311
|
-
unknown: () =>
|
|
312
|
-
void: () =>
|
|
313
|
-
array: <Type_1 extends
|
|
314
|
-
discriminatedUnion: <Discriminator extends string, DiscriminatorValue extends
|
|
315
|
-
enum: <U_1 extends string, T_3 extends [U_1, ...U_1[]]>(options: T_3) =>
|
|
316
|
-
instanceOf: <T_4 extends new (...args: any[]) => any>(cls: T_4) =>
|
|
317
|
-
intersection: <Left extends
|
|
318
|
-
lazy: <T_5 extends
|
|
319
|
-
literal: <T_6 extends
|
|
320
|
-
map: <Key extends
|
|
321
|
-
nativeEnum: <T_7 extends
|
|
322
|
-
nullable: <T_8 extends
|
|
323
|
-
nullish: <T_9 extends
|
|
324
|
-
object: <T_10 extends
|
|
256
|
+
name: typeof orchid_core.name;
|
|
257
|
+
raw: (sql: string, values?: false | Record<string, unknown> | undefined) => orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>;
|
|
258
|
+
smallint(this: orchid_core.ColumnTypesBase): pqb.SmallIntColumn;
|
|
259
|
+
integer(this: orchid_core.ColumnTypesBase): pqb.IntegerColumn;
|
|
260
|
+
bigint(this: orchid_core.ColumnTypesBase): pqb.BigIntColumn;
|
|
261
|
+
numeric<Precision extends number | undefined = undefined, Scale extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision | undefined, scale?: Scale | undefined): pqb.DecimalColumn<Precision, Scale>;
|
|
262
|
+
decimal<Precision_1 extends number | undefined = undefined, Scale_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_1 | undefined, scale?: Scale_1 | undefined): pqb.DecimalColumn<Precision_1, Scale_1>;
|
|
263
|
+
real(this: orchid_core.ColumnTypesBase): pqb.RealColumn;
|
|
264
|
+
doublePrecision(this: orchid_core.ColumnTypesBase): pqb.DoublePrecisionColumn;
|
|
265
|
+
smallSerial(this: orchid_core.ColumnTypesBase): pqb.SmallSerialColumn;
|
|
266
|
+
serial(this: orchid_core.ColumnTypesBase): pqb.SerialColumn;
|
|
267
|
+
bigSerial(this: orchid_core.ColumnTypesBase): pqb.BigSerialColumn;
|
|
268
|
+
money(this: orchid_core.ColumnTypesBase): pqb.MoneyColumn;
|
|
269
|
+
varchar<Limit extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, limit?: Limit | undefined): pqb.VarCharColumn<Limit>;
|
|
270
|
+
char<Limit_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, limit?: Limit_1 | undefined): pqb.CharColumn<Limit_1>;
|
|
271
|
+
text: (this: orchid_core.ColumnTypesBase, min: number, max: number) => TextColumn;
|
|
272
|
+
string: (this: orchid_core.ColumnTypesBase, min: number, max: number) => TextColumn;
|
|
273
|
+
bytea(this: orchid_core.ColumnTypesBase): pqb.ByteaColumn;
|
|
274
|
+
date(this: orchid_core.ColumnTypesBase): pqb.DateColumn;
|
|
275
|
+
timestamp<Precision_2 extends number>(this: orchid_core.ColumnTypesBase, precision?: Precision_2 | undefined): pqb.TimestampColumn<Precision_2>;
|
|
276
|
+
timestampWithTimeZone<Precision_3 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_3 | undefined): pqb.TimestampWithTimeZoneColumn<number>;
|
|
277
|
+
time<Precision_4 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_4 | undefined): pqb.TimeColumn<Precision_4>;
|
|
278
|
+
timeWithTimeZone<Precision_5 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, precision?: Precision_5 | undefined): pqb.TimeWithTimeZoneColumn<Precision_5>;
|
|
279
|
+
interval<Fields extends string | undefined = undefined, Precision_6 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, fields?: Fields | undefined, precision?: Precision_6 | undefined): pqb.IntervalColumn<Fields, Precision_6>;
|
|
280
|
+
boolean(this: orchid_core.ColumnTypesBase): pqb.BooleanColumn;
|
|
281
|
+
enum<U extends string, T extends [U, ...U[]]>(this: orchid_core.ColumnTypesBase, dataType: string, type: T): EnumColumn<U, T>;
|
|
282
|
+
point(this: orchid_core.ColumnTypesBase): pqb.PointColumn;
|
|
283
|
+
line(this: orchid_core.ColumnTypesBase): pqb.LineColumn;
|
|
284
|
+
lseg(this: orchid_core.ColumnTypesBase): pqb.LsegColumn;
|
|
285
|
+
box(this: orchid_core.ColumnTypesBase): pqb.BoxColumn;
|
|
286
|
+
path(this: orchid_core.ColumnTypesBase): pqb.PathColumn;
|
|
287
|
+
polygon(this: orchid_core.ColumnTypesBase): pqb.PolygonColumn;
|
|
288
|
+
circle(this: orchid_core.ColumnTypesBase): pqb.CircleColumn;
|
|
289
|
+
cidr(this: orchid_core.ColumnTypesBase): pqb.CidrColumn;
|
|
290
|
+
inet(this: orchid_core.ColumnTypesBase): pqb.InetColumn;
|
|
291
|
+
macaddr(this: orchid_core.ColumnTypesBase): pqb.MacAddrColumn;
|
|
292
|
+
macaddr8(this: orchid_core.ColumnTypesBase): pqb.MacAddr8Column;
|
|
293
|
+
bit<Length extends number>(this: orchid_core.ColumnTypesBase, length: Length): pqb.BitColumn<Length>;
|
|
294
|
+
bitVarying<Length_1 extends number | undefined = undefined>(this: orchid_core.ColumnTypesBase, length?: Length_1 | undefined): pqb.BitVaryingColumn<Length_1>;
|
|
295
|
+
tsvector(this: orchid_core.ColumnTypesBase): pqb.TsVectorColumn;
|
|
296
|
+
tsquery(this: orchid_core.ColumnTypesBase): pqb.TsQueryColumn;
|
|
297
|
+
uuid(this: orchid_core.ColumnTypesBase): pqb.UUIDColumn;
|
|
298
|
+
xml(this: orchid_core.ColumnTypesBase): pqb.XMLColumn;
|
|
299
|
+
json<Type extends orchid_core.JSONTypeAny>(this: orchid_core.ColumnTypesBase, schemaOrFn: Type | ((j: {
|
|
300
|
+
set: <Value extends orchid_core.JSONTypeAny>(valueType: Value) => orchid_core.JSONSet<Value>;
|
|
301
|
+
tuple: <T_1 extends [] | orchid_core.JSONTupleItems, Rest extends orchid_core.JSONTypeAny | null = null>(items: T_1, rest?: Rest) => orchid_core.JSONTuple<T_1, Rest>;
|
|
302
|
+
union: <T_2 extends [orchid_core.JSONTypeAny, orchid_core.JSONTypeAny, ...orchid_core.JSONTypeAny[]]>(types: T_2) => orchid_core.JSONUnion<T_2>;
|
|
303
|
+
any: () => orchid_core.JSONAny;
|
|
304
|
+
bigint: () => orchid_core.JSONBigInt;
|
|
305
|
+
boolean: () => orchid_core.JSONBoolean;
|
|
306
|
+
date: () => orchid_core.JSONDate;
|
|
307
|
+
nan: () => orchid_core.JSONNaN;
|
|
308
|
+
never: () => orchid_core.JSONNever;
|
|
309
|
+
null: () => orchid_core.JSONNull;
|
|
310
|
+
number: () => orchid_core.JSONNumber;
|
|
311
|
+
string: () => orchid_core.JSONString;
|
|
312
|
+
undefined: () => orchid_core.JSONUndefined;
|
|
313
|
+
unknown: () => orchid_core.JSONUnknown;
|
|
314
|
+
void: () => orchid_core.JSONVoid;
|
|
315
|
+
array: <Type_1 extends orchid_core.JSONTypeAny>(element: Type_1) => orchid_core.JSONArray<Type_1, "many">;
|
|
316
|
+
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[number]>;
|
|
317
|
+
enum: <U_1 extends string, T_3 extends [U_1, ...U_1[]]>(options: T_3) => orchid_core.JSONEnum<U_1, T_3>;
|
|
318
|
+
instanceOf: <T_4 extends new (...args: any[]) => any>(cls: T_4) => orchid_core.JSONInstanceOf<T_4>;
|
|
319
|
+
intersection: <Left extends orchid_core.JSONTypeAny, Right extends orchid_core.JSONTypeAny>(left: Left, right: Right) => orchid_core.JSONIntersection<Left, Right>;
|
|
320
|
+
lazy: <T_5 extends orchid_core.JSONTypeAny>(fn: () => T_5) => orchid_core.JSONLazy<T_5>;
|
|
321
|
+
literal: <T_6 extends orchid_core.Primitive>(value: T_6) => orchid_core.JSONLiteral<T_6>;
|
|
322
|
+
map: <Key extends orchid_core.JSONTypeAny, Value_1 extends orchid_core.JSONTypeAny>(keyType: Key, valueType: Value_1) => orchid_core.JSONMap<Key, Value_1>;
|
|
323
|
+
nativeEnum: <T_7 extends orchid_core.EnumLike>(givenEnum: T_7) => orchid_core.JSONNativeEnum<T_7>;
|
|
324
|
+
nullable: <T_8 extends orchid_core.JSONTypeAny>(type: T_8) => orchid_core.JSONNullable<T_8>;
|
|
325
|
+
nullish: <T_9 extends orchid_core.JSONTypeAny>(type: T_9) => orchid_core.JSONNullish<T_9>;
|
|
326
|
+
object: <T_10 extends orchid_core.JSONObjectShape, UnknownKeys extends orchid_core.UnknownKeysParam = "strip", Catchall extends orchid_core.JSONTypeAny = orchid_core.JSONTypeAny>(shape: T_10) => orchid_core.JSONObject<T_10, UnknownKeys, Catchall, orchid_core.JSONTypeAny extends Catchall ? orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never : (orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never) & {
|
|
325
327
|
[k: string]: Catchall["type"];
|
|
326
|
-
} extends infer T_12 extends object ? { [k_2 in keyof T_12]: ((
|
|
328
|
+
} extends infer T_12 extends object ? { [k_2 in keyof T_12]: ((orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }> extends infer T_11 extends object ? { [k in keyof T_11]: orchid_core.addQuestionMarks<{ [k_1 in keyof T_10]: T_10[k_1]["type"]; }>[k]; } : never) & {
|
|
327
329
|
[k: string]: Catchall["type"];
|
|
328
330
|
})[k_2]; } : never>;
|
|
329
|
-
optional: <T_13 extends
|
|
330
|
-
record: typeof
|
|
331
|
+
optional: <T_13 extends orchid_core.JSONTypeAny>(type: T_13) => orchid_core.JSONOptional<T_13>;
|
|
332
|
+
record: typeof orchid_core.record;
|
|
331
333
|
}) => Type)): pqb.JSONColumn<Type>;
|
|
332
|
-
jsonText(this:
|
|
333
|
-
array<Item extends ColumnType<unknown,
|
|
334
|
-
timestamps: <T_14 extends ColumnType<unknown,
|
|
334
|
+
jsonText(this: orchid_core.ColumnTypesBase): pqb.JSONTextColumn;
|
|
335
|
+
array<Item extends ColumnType<unknown, orchid_core.BaseOperators, unknown>>(this: orchid_core.ColumnTypesBase, item: Item): pqb.ArrayColumn<Item>;
|
|
336
|
+
timestamps: <T_14 extends ColumnType<unknown, orchid_core.BaseOperators, unknown>>(this: {
|
|
335
337
|
timestamp(): T_14;
|
|
336
338
|
}) => {
|
|
337
|
-
createdAt:
|
|
338
|
-
updatedAt:
|
|
339
|
+
createdAt: orchid_core.ColumnWithDefault<T_14, orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>>;
|
|
340
|
+
updatedAt: orchid_core.ColumnWithDefault<T_14, orchid_core.RawExpression<orchid_core.ColumnTypeBase<unknown, orchid_core.BaseOperators, unknown, orchid_core.ColumnDataBase>>>;
|
|
339
341
|
};
|
|
340
342
|
primaryKey(columns: string[], options?: {
|
|
341
343
|
name?: string | undefined;
|