@inflector/aura 0.4.5 → 0.4.6

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.
@@ -1,6 +1,9 @@
1
1
  import { Expr, InferSchema } from "@inflector/optima-pg";
2
- type Infer<T> = {
3
- [K in keyof T]: T[K];
2
+ type Where<T> = {
3
+ [K in keyof T]?: T[K] | Expr<T[K]>;
4
+ } & {
5
+ $and?: Where<T>[];
6
+ $or?: Where<T>[];
4
7
  };
5
8
  declare class RemoteTable<TDef extends Record<string, any>> {
6
9
  private Name;
@@ -8,347 +11,401 @@ declare class RemoteTable<TDef extends Record<string, any>> {
8
11
  constructor(name: string, workspace: string);
9
12
  private post;
10
13
  Get: () => {
11
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
14
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
12
15
  limit: (arg: number) => {
13
16
  offset: (arg: number) => {
14
17
  orderBy: (arg: {
15
18
  col: Array<keyof TDef & string>;
16
19
  order: "ASC" | "DESC";
17
- }) => {} & PromiseLike<Infer<TDef>[]>;
18
- } & PromiseLike<Infer<TDef>[]>;
20
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
21
+ } & PromiseLike<InferSchema<TDef>[]>;
19
22
  orderBy: (arg: {
20
23
  col: Array<keyof TDef & string>;
21
24
  order: "ASC" | "DESC";
22
25
  }) => {
23
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
24
- } & PromiseLike<Infer<TDef>[]>;
25
- } & PromiseLike<Infer<TDef>[]>;
26
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
27
+ } & PromiseLike<InferSchema<TDef>[]>;
28
+ } & PromiseLike<InferSchema<TDef>[]>;
26
29
  offset: (arg: number) => {
27
30
  limit: (arg: number) => {
28
31
  orderBy: (arg: {
29
32
  col: Array<keyof TDef & string>;
30
33
  order: "ASC" | "DESC";
31
- }) => {} & PromiseLike<Infer<TDef>[]>;
32
- } & PromiseLike<Infer<TDef>[]>;
34
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
35
+ } & PromiseLike<InferSchema<TDef>[]>;
33
36
  orderBy: (arg: {
34
37
  col: Array<keyof TDef & string>;
35
38
  order: "ASC" | "DESC";
36
39
  }) => {
37
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
38
- } & PromiseLike<Infer<TDef>[]>;
39
- } & PromiseLike<Infer<TDef>[]>;
40
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
41
+ } & PromiseLike<InferSchema<TDef>[]>;
42
+ } & PromiseLike<InferSchema<TDef>[]>;
40
43
  orderBy: (arg: {
41
44
  col: Array<keyof TDef & string>;
42
45
  order: "ASC" | "DESC";
43
46
  }) => {
44
47
  limit: (arg: number) => {
45
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
46
- } & PromiseLike<Infer<TDef>[]>;
48
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
49
+ } & PromiseLike<InferSchema<TDef>[]>;
47
50
  offset: (arg: number) => {
48
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
49
- } & PromiseLike<Infer<TDef>[]>;
50
- } & PromiseLike<Infer<TDef>[]>;
51
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
51
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
52
+ } & PromiseLike<InferSchema<TDef>[]>;
53
+ } & PromiseLike<InferSchema<TDef>[]>;
54
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
55
+ $and?: Where<InferSchema<TDef>>[] | undefined;
56
+ $or?: Where<InferSchema<TDef>>[] | undefined;
57
+ }) => {
52
58
  limit: (arg: number) => {
53
59
  offset: (arg: number) => {
54
60
  orderBy: (arg: {
55
61
  col: Array<keyof TDef & string>;
56
62
  order: "ASC" | "DESC";
57
- }) => {} & PromiseLike<Infer<TDef>[]>;
58
- } & PromiseLike<Infer<TDef>[]>;
63
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
64
+ } & PromiseLike<InferSchema<TDef>[]>;
59
65
  orderBy: (arg: {
60
66
  col: Array<keyof TDef & string>;
61
67
  order: "ASC" | "DESC";
62
68
  }) => {
63
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
64
- } & PromiseLike<Infer<TDef>[]>;
65
- } & PromiseLike<Infer<TDef>[]>;
69
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
70
+ } & PromiseLike<InferSchema<TDef>[]>;
71
+ } & PromiseLike<InferSchema<TDef>[]>;
66
72
  offset: (arg: number) => {
67
73
  limit: (arg: number) => {
68
74
  orderBy: (arg: {
69
75
  col: Array<keyof TDef & string>;
70
76
  order: "ASC" | "DESC";
71
- }) => {} & PromiseLike<Infer<TDef>[]>;
72
- } & PromiseLike<Infer<TDef>[]>;
77
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
78
+ } & PromiseLike<InferSchema<TDef>[]>;
73
79
  orderBy: (arg: {
74
80
  col: Array<keyof TDef & string>;
75
81
  order: "ASC" | "DESC";
76
82
  }) => {
77
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
78
- } & PromiseLike<Infer<TDef>[]>;
79
- } & PromiseLike<Infer<TDef>[]>;
83
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
84
+ } & PromiseLike<InferSchema<TDef>[]>;
85
+ } & PromiseLike<InferSchema<TDef>[]>;
80
86
  orderBy: (arg: {
81
87
  col: Array<keyof TDef & string>;
82
88
  order: "ASC" | "DESC";
83
89
  }) => {
84
90
  limit: (arg: number) => {
85
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
86
- } & PromiseLike<Infer<TDef>[]>;
91
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
92
+ } & PromiseLike<InferSchema<TDef>[]>;
87
93
  offset: (arg: number) => {
88
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
89
- } & PromiseLike<Infer<TDef>[]>;
90
- } & PromiseLike<Infer<TDef>[]>;
91
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
94
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
95
+ } & PromiseLike<InferSchema<TDef>[]>;
96
+ } & PromiseLike<InferSchema<TDef>[]>;
97
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
92
98
  limit: (arg: number) => {
93
99
  offset: (arg: number) => {
94
100
  orderBy: (arg: {
95
101
  col: Array<keyof TDef & string>;
96
102
  order: "ASC" | "DESC";
97
- }) => {} & PromiseLike<Infer<TDef>[]>;
98
- } & PromiseLike<Infer<TDef>[]>;
103
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
104
+ } & PromiseLike<InferSchema<TDef>[]>;
99
105
  orderBy: (arg: {
100
106
  col: Array<keyof TDef & string>;
101
107
  order: "ASC" | "DESC";
102
108
  }) => {
103
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
104
- } & PromiseLike<Infer<TDef>[]>;
105
- } & PromiseLike<Infer<TDef>[]>;
109
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
110
+ } & PromiseLike<InferSchema<TDef>[]>;
111
+ } & PromiseLike<InferSchema<TDef>[]>;
106
112
  offset: (arg: number) => {
107
113
  limit: (arg: number) => {
108
114
  orderBy: (arg: {
109
115
  col: Array<keyof TDef & string>;
110
116
  order: "ASC" | "DESC";
111
- }) => {} & PromiseLike<Infer<TDef>[]>;
112
- } & PromiseLike<Infer<TDef>[]>;
117
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
118
+ } & PromiseLike<InferSchema<TDef>[]>;
113
119
  orderBy: (arg: {
114
120
  col: Array<keyof TDef & string>;
115
121
  order: "ASC" | "DESC";
116
122
  }) => {
117
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
118
- } & PromiseLike<Infer<TDef>[]>;
119
- } & PromiseLike<Infer<TDef>[]>;
123
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
124
+ } & PromiseLike<InferSchema<TDef>[]>;
125
+ } & PromiseLike<InferSchema<TDef>[]>;
120
126
  orderBy: (arg: {
121
127
  col: Array<keyof TDef & string>;
122
128
  order: "ASC" | "DESC";
123
129
  }) => {
124
130
  limit: (arg: number) => {
125
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
126
- } & PromiseLike<Infer<TDef>[]>;
131
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
132
+ } & PromiseLike<InferSchema<TDef>[]>;
127
133
  offset: (arg: number) => {
128
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
129
- } & PromiseLike<Infer<TDef>[]>;
130
- } & PromiseLike<Infer<TDef>[]>;
131
- } & PromiseLike<Infer<TDef>[]>;
134
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
135
+ } & PromiseLike<InferSchema<TDef>[]>;
136
+ } & PromiseLike<InferSchema<TDef>[]>;
137
+ } & PromiseLike<InferSchema<TDef>[]>;
132
138
  limit: (arg: number) => {
133
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
139
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
134
140
  offset: (arg: number) => {
135
141
  orderBy: (arg: {
136
142
  col: Array<keyof TDef & string>;
137
143
  order: "ASC" | "DESC";
138
- }) => {} & PromiseLike<Infer<TDef>[]>;
139
- } & PromiseLike<Infer<TDef>[]>;
144
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
145
+ } & PromiseLike<InferSchema<TDef>[]>;
140
146
  orderBy: (arg: {
141
147
  col: Array<keyof TDef & string>;
142
148
  order: "ASC" | "DESC";
143
149
  }) => {
144
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
145
- } & PromiseLike<Infer<TDef>[]>;
146
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
150
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
151
+ } & PromiseLike<InferSchema<TDef>[]>;
152
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
153
+ $and?: Where<InferSchema<TDef>>[] | undefined;
154
+ $or?: Where<InferSchema<TDef>>[] | undefined;
155
+ }) => {
147
156
  offset: (arg: number) => {
148
157
  orderBy: (arg: {
149
158
  col: Array<keyof TDef & string>;
150
159
  order: "ASC" | "DESC";
151
- }) => {} & PromiseLike<Infer<TDef>[]>;
152
- } & PromiseLike<Infer<TDef>[]>;
160
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
161
+ } & PromiseLike<InferSchema<TDef>[]>;
153
162
  orderBy: (arg: {
154
163
  col: Array<keyof TDef & string>;
155
164
  order: "ASC" | "DESC";
156
165
  }) => {
157
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
158
- } & PromiseLike<Infer<TDef>[]>;
159
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
166
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
167
+ } & PromiseLike<InferSchema<TDef>[]>;
168
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
160
169
  offset: (arg: number) => {
161
170
  orderBy: (arg: {
162
171
  col: Array<keyof TDef & string>;
163
172
  order: "ASC" | "DESC";
164
- }) => {} & PromiseLike<Infer<TDef>[]>;
165
- } & PromiseLike<Infer<TDef>[]>;
173
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
174
+ } & PromiseLike<InferSchema<TDef>[]>;
166
175
  orderBy: (arg: {
167
176
  col: Array<keyof TDef & string>;
168
177
  order: "ASC" | "DESC";
169
178
  }) => {
170
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
171
- } & PromiseLike<Infer<TDef>[]>;
172
- } & PromiseLike<Infer<TDef>[]>;
179
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
180
+ } & PromiseLike<InferSchema<TDef>[]>;
181
+ } & PromiseLike<InferSchema<TDef>[]>;
173
182
  offset: (arg: number) => {
174
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
183
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
175
184
  orderBy: (arg: {
176
185
  col: Array<keyof TDef & string>;
177
186
  order: "ASC" | "DESC";
178
- }) => {} & PromiseLike<Infer<TDef>[]>;
179
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
187
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
188
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
189
+ $and?: Where<InferSchema<TDef>>[] | undefined;
190
+ $or?: Where<InferSchema<TDef>>[] | undefined;
191
+ }) => {
180
192
  orderBy: (arg: {
181
193
  col: Array<keyof TDef & string>;
182
194
  order: "ASC" | "DESC";
183
- }) => {} & PromiseLike<Infer<TDef>[]>;
184
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
195
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
196
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
185
197
  orderBy: (arg: {
186
198
  col: Array<keyof TDef & string>;
187
199
  order: "ASC" | "DESC";
188
- }) => {} & PromiseLike<Infer<TDef>[]>;
189
- } & PromiseLike<Infer<TDef>[]>;
200
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
201
+ } & PromiseLike<InferSchema<TDef>[]>;
190
202
  orderBy: (arg: {
191
203
  col: Array<keyof TDef & string>;
192
204
  order: "ASC" | "DESC";
193
205
  }) => {
194
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]>;
195
- } & PromiseLike<Infer<TDef>[]>;
196
- } & PromiseLike<Infer<TDef>[]>;
206
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
207
+ $and?: Where<InferSchema<TDef>>[] | undefined;
208
+ $or?: Where<InferSchema<TDef>>[] | undefined;
209
+ }) => {} & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>[]>;
210
+ } & PromiseLike<InferSchema<TDef>[]>;
211
+ } & PromiseLike<InferSchema<TDef>[]>;
197
212
  orderBy: (arg: {
198
213
  col: Array<keyof TDef & string>;
199
214
  order: "ASC" | "DESC";
200
215
  }) => {
201
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
202
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
203
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
204
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
205
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
206
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
207
- } & PromiseLike<Infer<TDef>[]>;
216
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
217
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
218
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
219
+ $and?: Where<InferSchema<TDef>>[] | undefined;
220
+ $or?: Where<InferSchema<TDef>>[] | undefined;
221
+ }) => {
222
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
223
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
224
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
225
+ } & PromiseLike<InferSchema<TDef>[]>;
208
226
  offset: (arg: number) => {
209
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]>;
210
- } & PromiseLike<Infer<TDef>[]>;
211
- } & PromiseLike<Infer<TDef>[]>;
212
- } & PromiseLike<Infer<TDef>[]>;
227
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
228
+ $and?: Where<InferSchema<TDef>>[] | undefined;
229
+ $or?: Where<InferSchema<TDef>>[] | undefined;
230
+ }) => {} & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>[]>;
231
+ } & PromiseLike<InferSchema<TDef>[]>;
232
+ } & PromiseLike<InferSchema<TDef>[]>;
233
+ } & PromiseLike<InferSchema<TDef>[]>;
213
234
  offset: (arg: number) => {
214
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
235
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
215
236
  limit: (arg: number) => {
216
237
  orderBy: (arg: {
217
238
  col: Array<keyof TDef & string>;
218
239
  order: "ASC" | "DESC";
219
- }) => {} & PromiseLike<Infer<TDef>[]>;
220
- } & PromiseLike<Infer<TDef>[]>;
240
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
241
+ } & PromiseLike<InferSchema<TDef>[]>;
221
242
  orderBy: (arg: {
222
243
  col: Array<keyof TDef & string>;
223
244
  order: "ASC" | "DESC";
224
245
  }) => {
225
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
226
- } & PromiseLike<Infer<TDef>[]>;
227
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
246
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
247
+ } & PromiseLike<InferSchema<TDef>[]>;
248
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
249
+ $and?: Where<InferSchema<TDef>>[] | undefined;
250
+ $or?: Where<InferSchema<TDef>>[] | undefined;
251
+ }) => {
228
252
  limit: (arg: number) => {
229
253
  orderBy: (arg: {
230
254
  col: Array<keyof TDef & string>;
231
255
  order: "ASC" | "DESC";
232
- }) => {} & PromiseLike<Infer<TDef>[]>;
233
- } & PromiseLike<Infer<TDef>[]>;
256
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
257
+ } & PromiseLike<InferSchema<TDef>[]>;
234
258
  orderBy: (arg: {
235
259
  col: Array<keyof TDef & string>;
236
260
  order: "ASC" | "DESC";
237
261
  }) => {
238
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
239
- } & PromiseLike<Infer<TDef>[]>;
240
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
262
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
263
+ } & PromiseLike<InferSchema<TDef>[]>;
264
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
241
265
  limit: (arg: number) => {
242
266
  orderBy: (arg: {
243
267
  col: Array<keyof TDef & string>;
244
268
  order: "ASC" | "DESC";
245
- }) => {} & PromiseLike<Infer<TDef>[]>;
246
- } & PromiseLike<Infer<TDef>[]>;
269
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
270
+ } & PromiseLike<InferSchema<TDef>[]>;
247
271
  orderBy: (arg: {
248
272
  col: Array<keyof TDef & string>;
249
273
  order: "ASC" | "DESC";
250
274
  }) => {
251
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
252
- } & PromiseLike<Infer<TDef>[]>;
253
- } & PromiseLike<Infer<TDef>[]>;
275
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
276
+ } & PromiseLike<InferSchema<TDef>[]>;
277
+ } & PromiseLike<InferSchema<TDef>[]>;
254
278
  limit: (arg: number) => {
255
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
279
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
256
280
  orderBy: (arg: {
257
281
  col: Array<keyof TDef & string>;
258
282
  order: "ASC" | "DESC";
259
- }) => {} & PromiseLike<Infer<TDef>[]>;
260
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
283
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
284
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
285
+ $and?: Where<InferSchema<TDef>>[] | undefined;
286
+ $or?: Where<InferSchema<TDef>>[] | undefined;
287
+ }) => {
261
288
  orderBy: (arg: {
262
289
  col: Array<keyof TDef & string>;
263
290
  order: "ASC" | "DESC";
264
- }) => {} & PromiseLike<Infer<TDef>[]>;
265
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
291
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
292
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
266
293
  orderBy: (arg: {
267
294
  col: Array<keyof TDef & string>;
268
295
  order: "ASC" | "DESC";
269
- }) => {} & PromiseLike<Infer<TDef>[]>;
270
- } & PromiseLike<Infer<TDef>[]>;
296
+ }) => {} & PromiseLike<InferSchema<TDef>[]>;
297
+ } & PromiseLike<InferSchema<TDef>[]>;
271
298
  orderBy: (arg: {
272
299
  col: Array<keyof TDef & string>;
273
300
  order: "ASC" | "DESC";
274
301
  }) => {
275
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]>;
276
- } & PromiseLike<Infer<TDef>[]>;
277
- } & PromiseLike<Infer<TDef>[]>;
302
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
303
+ $and?: Where<InferSchema<TDef>>[] | undefined;
304
+ $or?: Where<InferSchema<TDef>>[] | undefined;
305
+ }) => {} & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>[]>;
306
+ } & PromiseLike<InferSchema<TDef>[]>;
307
+ } & PromiseLike<InferSchema<TDef>[]>;
278
308
  orderBy: (arg: {
279
309
  col: Array<keyof TDef & string>;
280
310
  order: "ASC" | "DESC";
281
311
  }) => {
282
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
283
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
284
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
285
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
286
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
287
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
288
- } & PromiseLike<Infer<TDef>[]>;
312
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
313
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
314
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
315
+ $and?: Where<InferSchema<TDef>>[] | undefined;
316
+ $or?: Where<InferSchema<TDef>>[] | undefined;
317
+ }) => {
318
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
319
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
320
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
321
+ } & PromiseLike<InferSchema<TDef>[]>;
289
322
  limit: (arg: number) => {
290
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]>;
291
- } & PromiseLike<Infer<TDef>[]>;
292
- } & PromiseLike<Infer<TDef>[]>;
293
- } & PromiseLike<Infer<TDef>[]>;
323
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
324
+ $and?: Where<InferSchema<TDef>>[] | undefined;
325
+ $or?: Where<InferSchema<TDef>>[] | undefined;
326
+ }) => {} & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>[]>;
327
+ } & PromiseLike<InferSchema<TDef>[]>;
328
+ } & PromiseLike<InferSchema<TDef>[]>;
329
+ } & PromiseLike<InferSchema<TDef>[]>;
294
330
  orderBy: (arg: {
295
331
  col: Array<keyof TDef & string>;
296
332
  order: "ASC" | "DESC";
297
333
  }) => {
298
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
334
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
299
335
  limit: (arg: number) => {
300
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
301
- } & PromiseLike<Infer<TDef>[]>;
336
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
337
+ } & PromiseLike<InferSchema<TDef>[]>;
302
338
  offset: (arg: number) => {
303
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
304
- } & PromiseLike<Infer<TDef>[]>;
305
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
339
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
340
+ } & PromiseLike<InferSchema<TDef>[]>;
341
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
342
+ $and?: Where<InferSchema<TDef>>[] | undefined;
343
+ $or?: Where<InferSchema<TDef>>[] | undefined;
344
+ }) => {
306
345
  limit: (arg: number) => {
307
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
308
- } & PromiseLike<Infer<TDef>[]>;
346
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
347
+ } & PromiseLike<InferSchema<TDef>[]>;
309
348
  offset: (arg: number) => {
310
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
311
- } & PromiseLike<Infer<TDef>[]>;
312
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
349
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
350
+ } & PromiseLike<InferSchema<TDef>[]>;
351
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
313
352
  limit: (arg: number) => {
314
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
315
- } & PromiseLike<Infer<TDef>[]>;
353
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
354
+ } & PromiseLike<InferSchema<TDef>[]>;
316
355
  offset: (arg: number) => {
317
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
318
- } & PromiseLike<Infer<TDef>[]>;
319
- } & PromiseLike<Infer<TDef>[]>;
356
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
357
+ } & PromiseLike<InferSchema<TDef>[]>;
358
+ } & PromiseLike<InferSchema<TDef>[]>;
320
359
  limit: (arg: number) => {
321
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
322
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
323
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
324
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
325
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
326
- offset: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
327
- } & PromiseLike<Infer<TDef>[]>;
360
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
361
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
362
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
363
+ $and?: Where<InferSchema<TDef>>[] | undefined;
364
+ $or?: Where<InferSchema<TDef>>[] | undefined;
365
+ }) => {
366
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
367
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
368
+ offset: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
369
+ } & PromiseLike<InferSchema<TDef>[]>;
328
370
  offset: (arg: number) => {
329
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]>;
330
- } & PromiseLike<Infer<TDef>[]>;
331
- } & PromiseLike<Infer<TDef>[]>;
371
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
372
+ $and?: Where<InferSchema<TDef>>[] | undefined;
373
+ $or?: Where<InferSchema<TDef>>[] | undefined;
374
+ }) => {} & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>[]>;
375
+ } & PromiseLike<InferSchema<TDef>[]>;
376
+ } & PromiseLike<InferSchema<TDef>[]>;
332
377
  offset: (arg: number) => {
333
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
334
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
335
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
336
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
337
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
338
- limit: (arg: number) => {} & PromiseLike<Infer<TDef>[]>;
339
- } & PromiseLike<Infer<TDef>[]>;
378
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
379
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
380
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
381
+ $and?: Where<InferSchema<TDef>>[] | undefined;
382
+ $or?: Where<InferSchema<TDef>>[] | undefined;
383
+ }) => {
384
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
385
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
386
+ limit: (arg: number) => {} & PromiseLike<InferSchema<TDef>[]>;
387
+ } & PromiseLike<InferSchema<TDef>[]>;
340
388
  limit: (arg: number) => {
341
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]>;
342
- } & PromiseLike<Infer<TDef>[]>;
343
- } & PromiseLike<Infer<TDef>[]>;
344
- } & PromiseLike<Infer<TDef>[]>;
345
- } & PromiseLike<Infer<TDef>[]>;
389
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
390
+ $and?: Where<InferSchema<TDef>>[] | undefined;
391
+ $or?: Where<InferSchema<TDef>>[] | undefined;
392
+ }) => {} & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>[]>;
393
+ } & PromiseLike<InferSchema<TDef>[]>;
394
+ } & PromiseLike<InferSchema<TDef>[]>;
395
+ } & PromiseLike<InferSchema<TDef>[]>;
396
+ } & PromiseLike<InferSchema<TDef>[]>;
346
397
  GetOne: () => {
347
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>>;
348
- } & PromiseLike<Infer<TDef>>;
398
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
399
+ $and?: Where<InferSchema<TDef>>[] | undefined;
400
+ $or?: Where<InferSchema<TDef>>[] | undefined;
401
+ }) => {} & PromiseLike<InferSchema<TDef>> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>>;
402
+ } & PromiseLike<InferSchema<TDef>>;
349
403
  Delete: () => {
350
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<Infer<TDef>[]>;
351
- } & PromiseLike<Infer<TDef>[]>;
404
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
405
+ $and?: Where<InferSchema<TDef>>[] | undefined;
406
+ $or?: Where<InferSchema<TDef>>[] | undefined;
407
+ }) => {} & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<InferSchema<TDef>[]>;
408
+ } & PromiseLike<InferSchema<TDef>[]>;
352
409
  Insert: (record: Partial<InferSchema<TDef>> | Partial<InferSchema<TDef>>[]) => {
353
410
  returning?: ((arg: boolean | undefined) => {
354
411
  returning?: ((arg: boolean | undefined) => {
@@ -360,20 +417,20 @@ declare class RemoteTable<TDef extends Record<string, any>> {
360
417
  returning?: ((arg: boolean | undefined) => {
361
418
  returning?: ((arg: boolean | undefined) => {
362
419
  returning?: ((arg: boolean | undefined) => {
363
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
364
- } & PromiseLike<Infer<TDef>[]>) | undefined;
365
- } & PromiseLike<Infer<TDef>[]>) | undefined;
366
- } & PromiseLike<Infer<TDef>[]>) | undefined;
367
- } & PromiseLike<Infer<TDef>[]>) | undefined;
368
- } & PromiseLike<Infer<TDef>[]>) | undefined;
369
- } & PromiseLike<Infer<TDef>[]>) | undefined;
370
- } & PromiseLike<Infer<TDef>[]>) | undefined;
371
- } & PromiseLike<Infer<TDef>[]>) | undefined;
372
- } & PromiseLike<Infer<TDef>[]>) | undefined;
373
- } & PromiseLike<Infer<TDef>[]>) | undefined;
374
- } & PromiseLike<Infer<TDef>[]>;
420
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
421
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
422
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
423
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
424
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
425
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
426
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
427
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
428
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
429
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
430
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
431
+ } & PromiseLike<InferSchema<TDef>[]>;
375
432
  Update: (record: { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]>; }) => {
376
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
433
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
377
434
  returning?: ((arg: boolean | undefined) => {
378
435
  returning?: ((arg: boolean | undefined) => {
379
436
  returning?: ((arg: boolean | undefined) => {
@@ -383,17 +440,20 @@ declare class RemoteTable<TDef extends Record<string, any>> {
383
440
  returning?: ((arg: boolean | undefined) => {
384
441
  returning?: ((arg: boolean | undefined) => {
385
442
  returning?: ((arg: boolean | undefined) => {
386
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
387
- } & PromiseLike<Infer<TDef>[]>) | undefined;
388
- } & PromiseLike<Infer<TDef>[]>) | undefined;
389
- } & PromiseLike<Infer<TDef>[]>) | undefined;
390
- } & PromiseLike<Infer<TDef>[]>) | undefined;
391
- } & PromiseLike<Infer<TDef>[]>) | undefined;
392
- } & PromiseLike<Infer<TDef>[]>) | undefined;
393
- } & PromiseLike<Infer<TDef>[]>) | undefined;
394
- } & PromiseLike<Infer<TDef>[]>) | undefined;
395
- } & PromiseLike<Infer<TDef>[]>) | undefined;
396
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
443
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
444
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
445
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
446
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
447
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
448
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
449
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
450
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
451
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
452
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
453
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
454
+ $and?: Where<InferSchema<TDef>>[] | undefined;
455
+ $or?: Where<InferSchema<TDef>>[] | undefined;
456
+ }) => {
397
457
  returning?: ((arg: boolean | undefined) => {
398
458
  returning?: ((arg: boolean | undefined) => {
399
459
  returning?: ((arg: boolean | undefined) => {
@@ -403,17 +463,17 @@ declare class RemoteTable<TDef extends Record<string, any>> {
403
463
  returning?: ((arg: boolean | undefined) => {
404
464
  returning?: ((arg: boolean | undefined) => {
405
465
  returning?: ((arg: boolean | undefined) => {
406
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
407
- } & PromiseLike<Infer<TDef>[]>) | undefined;
408
- } & PromiseLike<Infer<TDef>[]>) | undefined;
409
- } & PromiseLike<Infer<TDef>[]>) | undefined;
410
- } & PromiseLike<Infer<TDef>[]>) | undefined;
411
- } & PromiseLike<Infer<TDef>[]>) | undefined;
412
- } & PromiseLike<Infer<TDef>[]>) | undefined;
413
- } & PromiseLike<Infer<TDef>[]>) | undefined;
414
- } & PromiseLike<Infer<TDef>[]>) | undefined;
415
- } & PromiseLike<Infer<TDef>[]>) | undefined;
416
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
466
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
467
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
468
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
469
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
470
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
471
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
472
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
473
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
474
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
475
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
476
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
417
477
  returning?: ((arg: boolean | undefined) => {
418
478
  returning?: ((arg: boolean | undefined) => {
419
479
  returning?: ((arg: boolean | undefined) => {
@@ -423,19 +483,19 @@ declare class RemoteTable<TDef extends Record<string, any>> {
423
483
  returning?: ((arg: boolean | undefined) => {
424
484
  returning?: ((arg: boolean | undefined) => {
425
485
  returning?: ((arg: boolean | undefined) => {
426
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
427
- } & PromiseLike<Infer<TDef>[]>) | undefined;
428
- } & PromiseLike<Infer<TDef>[]>) | undefined;
429
- } & PromiseLike<Infer<TDef>[]>) | undefined;
430
- } & PromiseLike<Infer<TDef>[]>) | undefined;
431
- } & PromiseLike<Infer<TDef>[]>) | undefined;
432
- } & PromiseLike<Infer<TDef>[]>) | undefined;
433
- } & PromiseLike<Infer<TDef>[]>) | undefined;
434
- } & PromiseLike<Infer<TDef>[]>) | undefined;
435
- } & PromiseLike<Infer<TDef>[]>) | undefined;
436
- } & PromiseLike<Infer<TDef>[]>;
486
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
487
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
488
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
489
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
490
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
491
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
492
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
493
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
494
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
495
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
496
+ } & PromiseLike<InferSchema<TDef>[]>;
437
497
  returning?: ((arg: boolean | undefined) => {
438
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
498
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
439
499
  returning?: ((arg: boolean | undefined) => {
440
500
  returning?: ((arg: boolean | undefined) => {
441
501
  returning?: ((arg: boolean | undefined) => {
@@ -444,16 +504,19 @@ declare class RemoteTable<TDef extends Record<string, any>> {
444
504
  returning?: ((arg: boolean | undefined) => {
445
505
  returning?: ((arg: boolean | undefined) => {
446
506
  returning?: ((arg: boolean | undefined) => {
447
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
448
- } & PromiseLike<Infer<TDef>[]>) | undefined;
449
- } & PromiseLike<Infer<TDef>[]>) | undefined;
450
- } & PromiseLike<Infer<TDef>[]>) | undefined;
451
- } & PromiseLike<Infer<TDef>[]>) | undefined;
452
- } & PromiseLike<Infer<TDef>[]>) | undefined;
453
- } & PromiseLike<Infer<TDef>[]>) | undefined;
454
- } & PromiseLike<Infer<TDef>[]>) | undefined;
455
- } & PromiseLike<Infer<TDef>[]>) | undefined;
456
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
507
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
508
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
509
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
510
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
511
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
512
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
513
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
514
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
515
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
516
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
517
+ $and?: Where<InferSchema<TDef>>[] | undefined;
518
+ $or?: Where<InferSchema<TDef>>[] | undefined;
519
+ }) => {
457
520
  returning?: ((arg: boolean | undefined) => {
458
521
  returning?: ((arg: boolean | undefined) => {
459
522
  returning?: ((arg: boolean | undefined) => {
@@ -462,16 +525,16 @@ declare class RemoteTable<TDef extends Record<string, any>> {
462
525
  returning?: ((arg: boolean | undefined) => {
463
526
  returning?: ((arg: boolean | undefined) => {
464
527
  returning?: ((arg: boolean | undefined) => {
465
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
466
- } & PromiseLike<Infer<TDef>[]>) | undefined;
467
- } & PromiseLike<Infer<TDef>[]>) | undefined;
468
- } & PromiseLike<Infer<TDef>[]>) | undefined;
469
- } & PromiseLike<Infer<TDef>[]>) | undefined;
470
- } & PromiseLike<Infer<TDef>[]>) | undefined;
471
- } & PromiseLike<Infer<TDef>[]>) | undefined;
472
- } & PromiseLike<Infer<TDef>[]>) | undefined;
473
- } & PromiseLike<Infer<TDef>[]>) | undefined;
474
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
528
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
529
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
530
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
531
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
532
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
533
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
534
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
535
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
536
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
537
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
475
538
  returning?: ((arg: boolean | undefined) => {
476
539
  returning?: ((arg: boolean | undefined) => {
477
540
  returning?: ((arg: boolean | undefined) => {
@@ -480,18 +543,18 @@ declare class RemoteTable<TDef extends Record<string, any>> {
480
543
  returning?: ((arg: boolean | undefined) => {
481
544
  returning?: ((arg: boolean | undefined) => {
482
545
  returning?: ((arg: boolean | undefined) => {
483
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
484
- } & PromiseLike<Infer<TDef>[]>) | undefined;
485
- } & PromiseLike<Infer<TDef>[]>) | undefined;
486
- } & PromiseLike<Infer<TDef>[]>) | undefined;
487
- } & PromiseLike<Infer<TDef>[]>) | undefined;
488
- } & PromiseLike<Infer<TDef>[]>) | undefined;
489
- } & PromiseLike<Infer<TDef>[]>) | undefined;
490
- } & PromiseLike<Infer<TDef>[]>) | undefined;
491
- } & PromiseLike<Infer<TDef>[]>) | undefined;
492
- } & PromiseLike<Infer<TDef>[]>;
546
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
547
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
548
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
549
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
550
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
551
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
552
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
553
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
554
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
555
+ } & PromiseLike<InferSchema<TDef>[]>;
493
556
  returning?: ((arg: boolean | undefined) => {
494
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
557
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
495
558
  returning?: ((arg: boolean | undefined) => {
496
559
  returning?: ((arg: boolean | undefined) => {
497
560
  returning?: ((arg: boolean | undefined) => {
@@ -499,15 +562,18 @@ declare class RemoteTable<TDef extends Record<string, any>> {
499
562
  returning?: ((arg: boolean | undefined) => {
500
563
  returning?: ((arg: boolean | undefined) => {
501
564
  returning?: ((arg: boolean | undefined) => {
502
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
503
- } & PromiseLike<Infer<TDef>[]>) | undefined;
504
- } & PromiseLike<Infer<TDef>[]>) | undefined;
505
- } & PromiseLike<Infer<TDef>[]>) | undefined;
506
- } & PromiseLike<Infer<TDef>[]>) | undefined;
507
- } & PromiseLike<Infer<TDef>[]>) | undefined;
508
- } & PromiseLike<Infer<TDef>[]>) | undefined;
509
- } & PromiseLike<Infer<TDef>[]>) | undefined;
510
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
565
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
566
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
567
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
568
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
569
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
570
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
571
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
572
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
573
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
574
+ $and?: Where<InferSchema<TDef>>[] | undefined;
575
+ $or?: Where<InferSchema<TDef>>[] | undefined;
576
+ }) => {
511
577
  returning?: ((arg: boolean | undefined) => {
512
578
  returning?: ((arg: boolean | undefined) => {
513
579
  returning?: ((arg: boolean | undefined) => {
@@ -515,15 +581,15 @@ declare class RemoteTable<TDef extends Record<string, any>> {
515
581
  returning?: ((arg: boolean | undefined) => {
516
582
  returning?: ((arg: boolean | undefined) => {
517
583
  returning?: ((arg: boolean | undefined) => {
518
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
519
- } & PromiseLike<Infer<TDef>[]>) | undefined;
520
- } & PromiseLike<Infer<TDef>[]>) | undefined;
521
- } & PromiseLike<Infer<TDef>[]>) | undefined;
522
- } & PromiseLike<Infer<TDef>[]>) | undefined;
523
- } & PromiseLike<Infer<TDef>[]>) | undefined;
524
- } & PromiseLike<Infer<TDef>[]>) | undefined;
525
- } & PromiseLike<Infer<TDef>[]>) | undefined;
526
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
584
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
585
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
586
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
587
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
588
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
589
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
590
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
591
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
592
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
527
593
  returning?: ((arg: boolean | undefined) => {
528
594
  returning?: ((arg: boolean | undefined) => {
529
595
  returning?: ((arg: boolean | undefined) => {
@@ -531,216 +597,246 @@ declare class RemoteTable<TDef extends Record<string, any>> {
531
597
  returning?: ((arg: boolean | undefined) => {
532
598
  returning?: ((arg: boolean | undefined) => {
533
599
  returning?: ((arg: boolean | undefined) => {
534
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
535
- } & PromiseLike<Infer<TDef>[]>) | undefined;
536
- } & PromiseLike<Infer<TDef>[]>) | undefined;
537
- } & PromiseLike<Infer<TDef>[]>) | undefined;
538
- } & PromiseLike<Infer<TDef>[]>) | undefined;
539
- } & PromiseLike<Infer<TDef>[]>) | undefined;
540
- } & PromiseLike<Infer<TDef>[]>) | undefined;
541
- } & PromiseLike<Infer<TDef>[]>) | undefined;
542
- } & PromiseLike<Infer<TDef>[]>;
600
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
601
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
602
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
603
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
604
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
605
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
606
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
607
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
608
+ } & PromiseLike<InferSchema<TDef>[]>;
543
609
  returning?: ((arg: boolean | undefined) => {
544
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
610
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
545
611
  returning?: ((arg: boolean | undefined) => {
546
612
  returning?: ((arg: boolean | undefined) => {
547
613
  returning?: ((arg: boolean | undefined) => {
548
614
  returning?: ((arg: boolean | undefined) => {
549
615
  returning?: ((arg: boolean | undefined) => {
550
616
  returning?: ((arg: boolean | undefined) => {
551
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
552
- } & PromiseLike<Infer<TDef>[]>) | undefined;
553
- } & PromiseLike<Infer<TDef>[]>) | undefined;
554
- } & PromiseLike<Infer<TDef>[]>) | undefined;
555
- } & PromiseLike<Infer<TDef>[]>) | undefined;
556
- } & PromiseLike<Infer<TDef>[]>) | undefined;
557
- } & PromiseLike<Infer<TDef>[]>) | undefined;
558
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
617
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
618
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
619
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
620
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
621
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
622
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
623
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
624
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
625
+ $and?: Where<InferSchema<TDef>>[] | undefined;
626
+ $or?: Where<InferSchema<TDef>>[] | undefined;
627
+ }) => {
559
628
  returning?: ((arg: boolean | undefined) => {
560
629
  returning?: ((arg: boolean | undefined) => {
561
630
  returning?: ((arg: boolean | undefined) => {
562
631
  returning?: ((arg: boolean | undefined) => {
563
632
  returning?: ((arg: boolean | undefined) => {
564
633
  returning?: ((arg: boolean | undefined) => {
565
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
566
- } & PromiseLike<Infer<TDef>[]>) | undefined;
567
- } & PromiseLike<Infer<TDef>[]>) | undefined;
568
- } & PromiseLike<Infer<TDef>[]>) | undefined;
569
- } & PromiseLike<Infer<TDef>[]>) | undefined;
570
- } & PromiseLike<Infer<TDef>[]>) | undefined;
571
- } & PromiseLike<Infer<TDef>[]>) | undefined;
572
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
634
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
635
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
636
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
637
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
638
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
639
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
640
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
641
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
573
642
  returning?: ((arg: boolean | undefined) => {
574
643
  returning?: ((arg: boolean | undefined) => {
575
644
  returning?: ((arg: boolean | undefined) => {
576
645
  returning?: ((arg: boolean | undefined) => {
577
646
  returning?: ((arg: boolean | undefined) => {
578
647
  returning?: ((arg: boolean | undefined) => {
579
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
580
- } & PromiseLike<Infer<TDef>[]>) | undefined;
581
- } & PromiseLike<Infer<TDef>[]>) | undefined;
582
- } & PromiseLike<Infer<TDef>[]>) | undefined;
583
- } & PromiseLike<Infer<TDef>[]>) | undefined;
584
- } & PromiseLike<Infer<TDef>[]>) | undefined;
585
- } & PromiseLike<Infer<TDef>[]>) | undefined;
586
- } & PromiseLike<Infer<TDef>[]>;
648
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
649
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
650
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
651
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
652
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
653
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
654
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
655
+ } & PromiseLike<InferSchema<TDef>[]>;
587
656
  returning?: ((arg: boolean | undefined) => {
588
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
657
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
589
658
  returning?: ((arg: boolean | undefined) => {
590
659
  returning?: ((arg: boolean | undefined) => {
591
660
  returning?: ((arg: boolean | undefined) => {
592
661
  returning?: ((arg: boolean | undefined) => {
593
662
  returning?: ((arg: boolean | undefined) => {
594
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
595
- } & PromiseLike<Infer<TDef>[]>) | undefined;
596
- } & PromiseLike<Infer<TDef>[]>) | undefined;
597
- } & PromiseLike<Infer<TDef>[]>) | undefined;
598
- } & PromiseLike<Infer<TDef>[]>) | undefined;
599
- } & PromiseLike<Infer<TDef>[]>) | undefined;
600
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
663
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
664
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
665
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
666
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
667
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
668
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
669
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
670
+ $and?: Where<InferSchema<TDef>>[] | undefined;
671
+ $or?: Where<InferSchema<TDef>>[] | undefined;
672
+ }) => {
601
673
  returning?: ((arg: boolean | undefined) => {
602
674
  returning?: ((arg: boolean | undefined) => {
603
675
  returning?: ((arg: boolean | undefined) => {
604
676
  returning?: ((arg: boolean | undefined) => {
605
677
  returning?: ((arg: boolean | undefined) => {
606
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
607
- } & PromiseLike<Infer<TDef>[]>) | undefined;
608
- } & PromiseLike<Infer<TDef>[]>) | undefined;
609
- } & PromiseLike<Infer<TDef>[]>) | undefined;
610
- } & PromiseLike<Infer<TDef>[]>) | undefined;
611
- } & PromiseLike<Infer<TDef>[]>) | undefined;
612
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
678
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
679
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
680
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
681
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
682
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
683
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
684
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
613
685
  returning?: ((arg: boolean | undefined) => {
614
686
  returning?: ((arg: boolean | undefined) => {
615
687
  returning?: ((arg: boolean | undefined) => {
616
688
  returning?: ((arg: boolean | undefined) => {
617
689
  returning?: ((arg: boolean | undefined) => {
618
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
619
- } & PromiseLike<Infer<TDef>[]>) | undefined;
620
- } & PromiseLike<Infer<TDef>[]>) | undefined;
621
- } & PromiseLike<Infer<TDef>[]>) | undefined;
622
- } & PromiseLike<Infer<TDef>[]>) | undefined;
623
- } & PromiseLike<Infer<TDef>[]>) | undefined;
624
- } & PromiseLike<Infer<TDef>[]>;
690
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
691
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
692
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
693
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
694
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
695
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
696
+ } & PromiseLike<InferSchema<TDef>[]>;
625
697
  returning?: ((arg: boolean | undefined) => {
626
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
698
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
627
699
  returning?: ((arg: boolean | undefined) => {
628
700
  returning?: ((arg: boolean | undefined) => {
629
701
  returning?: ((arg: boolean | undefined) => {
630
702
  returning?: ((arg: boolean | undefined) => {
631
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
632
- } & PromiseLike<Infer<TDef>[]>) | undefined;
633
- } & PromiseLike<Infer<TDef>[]>) | undefined;
634
- } & PromiseLike<Infer<TDef>[]>) | undefined;
635
- } & PromiseLike<Infer<TDef>[]>) | undefined;
636
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
703
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
704
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
705
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
706
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
707
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
708
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
709
+ $and?: Where<InferSchema<TDef>>[] | undefined;
710
+ $or?: Where<InferSchema<TDef>>[] | undefined;
711
+ }) => {
637
712
  returning?: ((arg: boolean | undefined) => {
638
713
  returning?: ((arg: boolean | undefined) => {
639
714
  returning?: ((arg: boolean | undefined) => {
640
715
  returning?: ((arg: boolean | undefined) => {
641
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
642
- } & PromiseLike<Infer<TDef>[]>) | undefined;
643
- } & PromiseLike<Infer<TDef>[]>) | undefined;
644
- } & PromiseLike<Infer<TDef>[]>) | undefined;
645
- } & PromiseLike<Infer<TDef>[]>) | undefined;
646
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
716
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
717
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
718
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
719
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
720
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
721
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
647
722
  returning?: ((arg: boolean | undefined) => {
648
723
  returning?: ((arg: boolean | undefined) => {
649
724
  returning?: ((arg: boolean | undefined) => {
650
725
  returning?: ((arg: boolean | undefined) => {
651
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
652
- } & PromiseLike<Infer<TDef>[]>) | undefined;
653
- } & PromiseLike<Infer<TDef>[]>) | undefined;
654
- } & PromiseLike<Infer<TDef>[]>) | undefined;
655
- } & PromiseLike<Infer<TDef>[]>) | undefined;
656
- } & PromiseLike<Infer<TDef>[]>;
726
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
727
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
728
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
729
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
730
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
731
+ } & PromiseLike<InferSchema<TDef>[]>;
657
732
  returning?: ((arg: boolean | undefined) => {
658
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
733
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
659
734
  returning?: ((arg: boolean | undefined) => {
660
735
  returning?: ((arg: boolean | undefined) => {
661
736
  returning?: ((arg: boolean | undefined) => {
662
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
663
- } & PromiseLike<Infer<TDef>[]>) | undefined;
664
- } & PromiseLike<Infer<TDef>[]>) | undefined;
665
- } & PromiseLike<Infer<TDef>[]>) | undefined;
666
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
737
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
738
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
739
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
740
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
741
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
742
+ $and?: Where<InferSchema<TDef>>[] | undefined;
743
+ $or?: Where<InferSchema<TDef>>[] | undefined;
744
+ }) => {
667
745
  returning?: ((arg: boolean | undefined) => {
668
746
  returning?: ((arg: boolean | undefined) => {
669
747
  returning?: ((arg: boolean | undefined) => {
670
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
671
- } & PromiseLike<Infer<TDef>[]>) | undefined;
672
- } & PromiseLike<Infer<TDef>[]>) | undefined;
673
- } & PromiseLike<Infer<TDef>[]>) | undefined;
674
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
748
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
749
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
750
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
751
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
752
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
675
753
  returning?: ((arg: boolean | undefined) => {
676
754
  returning?: ((arg: boolean | undefined) => {
677
755
  returning?: ((arg: boolean | undefined) => {
678
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
679
- } & PromiseLike<Infer<TDef>[]>) | undefined;
680
- } & PromiseLike<Infer<TDef>[]>) | undefined;
681
- } & PromiseLike<Infer<TDef>[]>) | undefined;
682
- } & PromiseLike<Infer<TDef>[]>;
756
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
757
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
758
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
759
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
760
+ } & PromiseLike<InferSchema<TDef>[]>;
683
761
  returning?: ((arg: boolean | undefined) => {
684
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
762
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
685
763
  returning?: ((arg: boolean | undefined) => {
686
764
  returning?: ((arg: boolean | undefined) => {
687
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
688
- } & PromiseLike<Infer<TDef>[]>) | undefined;
689
- } & PromiseLike<Infer<TDef>[]>) | undefined;
690
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
765
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
766
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
767
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
768
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
769
+ $and?: Where<InferSchema<TDef>>[] | undefined;
770
+ $or?: Where<InferSchema<TDef>>[] | undefined;
771
+ }) => {
691
772
  returning?: ((arg: boolean | undefined) => {
692
773
  returning?: ((arg: boolean | undefined) => {
693
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
694
- } & PromiseLike<Infer<TDef>[]>) | undefined;
695
- } & PromiseLike<Infer<TDef>[]>) | undefined;
696
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
774
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
775
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
776
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
777
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
697
778
  returning?: ((arg: boolean | undefined) => {
698
779
  returning?: ((arg: boolean | undefined) => {
699
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
700
- } & PromiseLike<Infer<TDef>[]>) | undefined;
701
- } & PromiseLike<Infer<TDef>[]>) | undefined;
702
- } & PromiseLike<Infer<TDef>[]>;
780
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
781
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
782
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
783
+ } & PromiseLike<InferSchema<TDef>[]>;
703
784
  returning?: ((arg: boolean | undefined) => {
704
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
785
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
705
786
  returning?: ((arg: boolean | undefined) => {
706
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
707
- } & PromiseLike<Infer<TDef>[]>) | undefined;
708
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
787
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
788
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
789
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
790
+ $and?: Where<InferSchema<TDef>>[] | undefined;
791
+ $or?: Where<InferSchema<TDef>>[] | undefined;
792
+ }) => {
709
793
  returning?: ((arg: boolean | undefined) => {
710
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
711
- } & PromiseLike<Infer<TDef>[]>) | undefined;
712
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
794
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
795
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
796
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
713
797
  returning?: ((arg: boolean | undefined) => {
714
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
715
- } & PromiseLike<Infer<TDef>[]>) | undefined;
716
- } & PromiseLike<Infer<TDef>[]>;
798
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
799
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
800
+ } & PromiseLike<InferSchema<TDef>[]>;
717
801
  returning?: ((arg: boolean | undefined) => {
718
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {
719
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
720
- } & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {
721
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
722
- } & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => {
723
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
724
- } & PromiseLike<Infer<TDef>[]>;
802
+ where: Where<InferSchema<TDef>> extends boolean ? () => {
803
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
804
+ } & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
805
+ $and?: Where<InferSchema<TDef>>[] | undefined;
806
+ $or?: Where<InferSchema<TDef>>[] | undefined;
807
+ }) => {
808
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
809
+ } & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => {
810
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
811
+ } & PromiseLike<InferSchema<TDef>[]>;
725
812
  returning?: ((arg: boolean | undefined) => {
726
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => /*elided*/ any & PromiseLike<Infer<TDef>[]> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => /*elided*/ any & PromiseLike<Infer<TDef>[]> : (arg: Partial<Record<keyof TDef, any>>) => /*elided*/ any & PromiseLike<Infer<TDef>[]>;
727
- returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<Infer<TDef>[]>) | undefined;
728
- } & PromiseLike<Infer<TDef>[]>) | undefined;
729
- } & PromiseLike<Infer<TDef>[]>) | undefined;
730
- } & PromiseLike<Infer<TDef>[]>) | undefined;
731
- } & PromiseLike<Infer<TDef>[]>) | undefined;
732
- } & PromiseLike<Infer<TDef>[]>) | undefined;
733
- } & PromiseLike<Infer<TDef>[]>) | undefined;
734
- } & PromiseLike<Infer<TDef>[]>) | undefined;
735
- } & PromiseLike<Infer<TDef>[]>) | undefined;
736
- } & PromiseLike<Infer<TDef>[]>) | undefined;
737
- } & PromiseLike<Infer<TDef>[]>) | undefined;
738
- } & PromiseLike<Infer<TDef>[]>;
813
+ where: Where<InferSchema<TDef>> extends boolean ? () => /*elided*/ any & PromiseLike<InferSchema<TDef>[]> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
814
+ $and?: Where<InferSchema<TDef>>[] | undefined;
815
+ $or?: Where<InferSchema<TDef>>[] | undefined;
816
+ }) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]> : (arg: Where<InferSchema<TDef>>) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>;
817
+ returning?: ((arg: boolean | undefined) => /*elided*/ any & PromiseLike<InferSchema<TDef>[]>) | undefined;
818
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
819
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
820
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
821
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
822
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
823
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
824
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
825
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
826
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
827
+ } & PromiseLike<InferSchema<TDef>[]>) | undefined;
828
+ } & PromiseLike<InferSchema<TDef>[]>;
739
829
  Count: () => {
740
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<number> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<number> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<number>;
830
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<number> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
831
+ $and?: Where<InferSchema<TDef>>[] | undefined;
832
+ $or?: Where<InferSchema<TDef>>[] | undefined;
833
+ }) => {} & PromiseLike<number> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<number>;
741
834
  } & PromiseLike<number>;
742
835
  Exist: () => {
743
- where: Partial<Record<keyof TDef, any>> extends boolean ? () => {} & PromiseLike<boolean> : Partial<Record<keyof TDef, any>> extends any[] ? (...args: any[] & Partial<Record<keyof TDef, any>>) => {} & PromiseLike<boolean> : (arg: Partial<Record<keyof TDef, any>>) => {} & PromiseLike<boolean>;
836
+ where: Where<InferSchema<TDef>> extends boolean ? () => {} & PromiseLike<boolean> : Where<InferSchema<TDef>> extends any[] ? (...args: any[] & { [K in keyof InferSchema<TDef>]?: InferSchema<TDef>[K] | Expr<InferSchema<TDef>[K]> | undefined; } & {
837
+ $and?: Where<InferSchema<TDef>>[] | undefined;
838
+ $or?: Where<InferSchema<TDef>>[] | undefined;
839
+ }) => {} & PromiseLike<boolean> : (arg: Where<InferSchema<TDef>>) => {} & PromiseLike<boolean>;
744
840
  } & PromiseLike<boolean>;
745
841
  Subscribe: (callback: (v: {
746
842
  action: string;