@bunyad/orm 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/casts.d.ts +50 -0
- package/dist/casts.js +309 -0
- package/dist/concerns.d.ts +64 -0
- package/dist/concerns.js +216 -0
- package/dist/decorators.d.ts +7 -0
- package/dist/decorators.js +12 -0
- package/dist/eager-fetch.d.ts +7 -0
- package/dist/eager-fetch.js +38 -0
- package/dist/eager.d.ts +24 -0
- package/dist/eager.js +854 -0
- package/dist/factory.d.ts +68 -0
- package/dist/factory.js +265 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/model-events.d.ts +43 -0
- package/dist/model-events.js +138 -0
- package/dist/model-helpers.d.ts +32 -0
- package/dist/model-helpers.js +99 -0
- package/dist/model-query.d.ts +312 -0
- package/dist/model-query.js +3170 -0
- package/dist/model-strictness.d.ts +35 -0
- package/dist/model-strictness.js +114 -0
- package/dist/model.d.ts +490 -0
- package/dist/model.js +1931 -0
- package/dist/orm-collection.d.ts +37 -0
- package/dist/orm-collection.js +150 -0
- package/dist/pivot.d.ts +9 -0
- package/dist/pivot.js +9 -0
- package/dist/relations.d.ts +335 -0
- package/dist/relations.js +1164 -0
- package/dist/scopes.d.ts +36 -0
- package/dist/scopes.js +128 -0
- package/package.json +49 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fluent query builder returned by Model.query() / newQuery().
|
|
3
|
+
*/
|
|
4
|
+
import type { DateInput, QueryBuilder } from "@bunyad/database";
|
|
5
|
+
import { CursorPaginator, LengthAwarePaginator, Paginator } from "@bunyad/database";
|
|
6
|
+
import { Collection } from "@bunyad/common";
|
|
7
|
+
import { OrmCollection } from "./orm-collection.js";
|
|
8
|
+
import { type CastDefinition } from "./casts.js";
|
|
9
|
+
import { Model, type ModelClass, type ModelQueryOptions } from "./model.js";
|
|
10
|
+
/**
|
|
11
|
+
* Local-scope Proxy exposes this so callers can reach the real `ModelQuery`
|
|
12
|
+
* (private fields are not accessible through a Proxy).
|
|
13
|
+
*/
|
|
14
|
+
export declare const MODEL_QUERY_TARGET: unique symbol;
|
|
15
|
+
/** Unwrap a local-scope Proxy to the underlying `ModelQuery` instance. */
|
|
16
|
+
export declare function unwrapModelQuery<Q extends ModelQuery>(query: Q): Q;
|
|
17
|
+
export declare class ModelQuery<T extends Model = Model, TResult extends "model" | "row" = "model"> {
|
|
18
|
+
#private;
|
|
19
|
+
private model;
|
|
20
|
+
constructor(model: ModelClass, options?: ModelQueryOptions);
|
|
21
|
+
/** `get()` returns plain row objects. Models are not built. */
|
|
22
|
+
rows(): ModelQuery<T, "row">;
|
|
23
|
+
/** Laravel `withoutGlobalScopes`. */
|
|
24
|
+
withoutGlobalScopes(names?: string[]): this;
|
|
25
|
+
/** Laravel `withoutGlobalScope`. */
|
|
26
|
+
withoutGlobalScope(name: string): this;
|
|
27
|
+
/** Laravel `withTrashed()`. */
|
|
28
|
+
withTrashed(): this;
|
|
29
|
+
/** Laravel `onlyTrashed()`. */
|
|
30
|
+
onlyTrashed(): this;
|
|
31
|
+
/** Laravel `withoutTrashed()`. */
|
|
32
|
+
withoutTrashed(): this;
|
|
33
|
+
/**
|
|
34
|
+
* Laravel `Builder::withAttributes` — pending attrs for `create()`, and
|
|
35
|
+
* matching `where` conditions when `asConditions` is true (default).
|
|
36
|
+
*/
|
|
37
|
+
withAttributes(attributes: Record<string, unknown> | string, valueOrAsConditions?: unknown, asConditions?: boolean): this;
|
|
38
|
+
/** Laravel `withCasts` — merge query-time casts for hydration. */
|
|
39
|
+
withCasts(casts: Record<string, CastDefinition>): this;
|
|
40
|
+
/** Laravel `has`. */
|
|
41
|
+
has(relation: string): this;
|
|
42
|
+
/** Laravel `doesntHave`. */
|
|
43
|
+
doesntHave(relation: string): this;
|
|
44
|
+
/** Laravel `whereHas`. */
|
|
45
|
+
whereHas(relation: string, callback?: (query: ModelQuery) => void): this;
|
|
46
|
+
/** Laravel `orWhereHas`. */
|
|
47
|
+
orWhereHas(relation: string, callback?: (query: ModelQuery) => void): this;
|
|
48
|
+
/** Laravel `whereDoesntHave`. */
|
|
49
|
+
whereDoesntHave(relation: string, callback?: (query: ModelQuery) => void): this;
|
|
50
|
+
/** Laravel `orWhereDoesntHave`. */
|
|
51
|
+
orWhereDoesntHave(relation: string, callback?: (query: ModelQuery) => void): this;
|
|
52
|
+
/**
|
|
53
|
+
* Laravel `whereRelation($relation, $column, $operator = null, $value = null)`.
|
|
54
|
+
* Convenience wrapper around `whereHas` with a column constraint.
|
|
55
|
+
*/
|
|
56
|
+
whereRelation(relation: string, column: string, opOrValue: unknown, value?: unknown): this;
|
|
57
|
+
/** Laravel `orWhereRelation`. */
|
|
58
|
+
orWhereRelation(relation: string, column: string, opOrValue: unknown, value?: unknown): this;
|
|
59
|
+
/** Laravel `orHas`. */
|
|
60
|
+
orHas(relation: string): this;
|
|
61
|
+
/** Laravel `orDoesntHave`. */
|
|
62
|
+
orDoesntHave(relation: string): this;
|
|
63
|
+
/**
|
|
64
|
+
* Laravel `whereBelongsTo($model, $relationshipName = null)`.
|
|
65
|
+
* Constrains by the foreign key of a belongsTo relation.
|
|
66
|
+
*/
|
|
67
|
+
whereBelongsTo(related: Model, relationName?: string): this;
|
|
68
|
+
/** Laravel `orWhereBelongsTo`. */
|
|
69
|
+
orWhereBelongsTo(related: Model, relationName?: string): this;
|
|
70
|
+
/**
|
|
71
|
+
* Laravel `whereMorphedTo($relation, $model)`.
|
|
72
|
+
*/
|
|
73
|
+
whereMorphedTo(relation: string, model: Model): this;
|
|
74
|
+
orWhereMorphedTo(relation: string, model: Model): this;
|
|
75
|
+
whereNotMorphedTo(relation: string, model: Model): this;
|
|
76
|
+
orWhereNotMorphedTo(relation: string, model: Model): this;
|
|
77
|
+
/**
|
|
78
|
+
* Laravel `whereMorphRelation($relation, $types, $column, …)` — simplified:
|
|
79
|
+
* `whereMorphRelation('commentable', TypeModel, column, op?, value?)`.
|
|
80
|
+
*/
|
|
81
|
+
whereMorphRelation(relation: string, type: ModelClass, column: string, opOrValue: unknown, value?: unknown): this;
|
|
82
|
+
orWhereMorphRelation(relation: string, type: ModelClass, column: string, opOrValue: unknown, value?: unknown): this;
|
|
83
|
+
/**
|
|
84
|
+
* Laravel `whereHasMorph($relation, $types, $callback?)`.
|
|
85
|
+
* `$types` may be a single model class or an array.
|
|
86
|
+
*/
|
|
87
|
+
whereHasMorph(relation: string, types: ModelClass | ModelClass[], callback?: (query: ModelQuery) => void): this;
|
|
88
|
+
orWhereHasMorph(relation: string, types: ModelClass | ModelClass[], callback?: (query: ModelQuery) => void): this;
|
|
89
|
+
whereDoesntHaveMorph(relation: string, types: ModelClass | ModelClass[], callback?: (query: ModelQuery) => void): this;
|
|
90
|
+
orWhereDoesntHaveMorph(relation: string, types: ModelClass | ModelClass[], callback?: (query: ModelQuery) => void): this;
|
|
91
|
+
hasMorph(relation: string, types: ModelClass | ModelClass[]): this;
|
|
92
|
+
doesntHaveMorph(relation: string, types: ModelClass | ModelClass[]): this;
|
|
93
|
+
/**
|
|
94
|
+
* Laravel `withWhereHas($relation, $callback?)` — whereHas + eager with same constraint.
|
|
95
|
+
*/
|
|
96
|
+
withWhereHas(relation: string, callback?: (query: ModelQuery) => void): this;
|
|
97
|
+
/** Laravel `whereAny` (forwarded to query builder). */
|
|
98
|
+
whereAny(columns: string[], opOrValue: unknown, value?: unknown): this;
|
|
99
|
+
orWhereAny(columns: string[], opOrValue: unknown, value?: unknown): this;
|
|
100
|
+
whereAll(columns: string[], opOrValue: unknown, value?: unknown): this;
|
|
101
|
+
orWhereAll(columns: string[], opOrValue: unknown, value?: unknown): this;
|
|
102
|
+
whereNone(columns: string[], opOrValue: unknown, value?: unknown): this;
|
|
103
|
+
orWhereNone(columns: string[], opOrValue: unknown, value?: unknown): this;
|
|
104
|
+
/** Laravel `whereKey($id)` / `whereKey([$ids])`. */
|
|
105
|
+
whereKey(id: string | number | Array<string | number>): this;
|
|
106
|
+
/** Laravel `whereKeyNot`. */
|
|
107
|
+
whereKeyNot(id: string | number | Array<string | number>): this;
|
|
108
|
+
/** Laravel `whereUuid($column, $uuid)`. */
|
|
109
|
+
whereUuid(column: string, value: string): this;
|
|
110
|
+
/** Laravel `whereUlid($column, $ulid)`. */
|
|
111
|
+
whereUlid(column: string, value: string): this;
|
|
112
|
+
/** Laravel `whereNot(closure)` nested group. */
|
|
113
|
+
whereNot(callback: (query: ModelQuery<T>) => void): this;
|
|
114
|
+
orWhereNot(callback: (query: ModelQuery<T>) => void): this;
|
|
115
|
+
/** Laravel `firstWhere`. */
|
|
116
|
+
firstWhere(column: string, value: unknown): T | null | Promise<T | null>;
|
|
117
|
+
firstWhere(column: string, op: string, value: unknown): T | null | Promise<T | null>;
|
|
118
|
+
/** Laravel `findMany`. */
|
|
119
|
+
findMany(ids: Array<string | number>): OrmCollection<T> | Promise<OrmCollection<T>>;
|
|
120
|
+
/** Laravel `findOr($id, $callback)`. */
|
|
121
|
+
findOr(id: string | number, callback: () => T | Promise<T>): Promise<T>;
|
|
122
|
+
/** Laravel `findOrNew`. */
|
|
123
|
+
findOrNew(id: string | number): Promise<T>;
|
|
124
|
+
/** Laravel `firstOr($callback)`. */
|
|
125
|
+
firstOr(callback: () => T | Promise<T>): Promise<T>;
|
|
126
|
+
/** Laravel `valueOrFail`. */
|
|
127
|
+
valueOrFail(column: string): Promise<unknown>;
|
|
128
|
+
/** Laravel `soleValue`. */
|
|
129
|
+
soleValue(column: string): Promise<unknown>;
|
|
130
|
+
/** `withCount` — `'posts'`, `'posts as post_total'`, a string list, or `{ products: { as: 'productsCount' } }`. */
|
|
131
|
+
withCount(...relations: Array<string | string[] | Record<string, true | string | ((query: ModelQuery) => void) | {
|
|
132
|
+
as?: string;
|
|
133
|
+
}>>): this;
|
|
134
|
+
/** Laravel `withSum($relation, $column)`. */
|
|
135
|
+
withSum(relation: string, column: string): this;
|
|
136
|
+
withAvg(relation: string, column: string): this;
|
|
137
|
+
withMin(relation: string, column: string): this;
|
|
138
|
+
withMax(relation: string, column: string): this;
|
|
139
|
+
/** Laravel `withExists($relation)`. */
|
|
140
|
+
withExists(...relations: string[]): this;
|
|
141
|
+
/** Laravel `withAggregate($relation, $column, $function)`. */
|
|
142
|
+
withAggregate(relation: string, column: string, fn: "count" | "sum" | "avg" | "min" | "max"): this;
|
|
143
|
+
/** Laravel Eloquent `join` (hydrated models still from the base table). */
|
|
144
|
+
join(table: string, first: string, op: string, second: string): this;
|
|
145
|
+
/** Laravel `leftJoin`. */
|
|
146
|
+
leftJoin(table: string, first: string, op: string, second: string): this;
|
|
147
|
+
/** Laravel `rightJoin`. */
|
|
148
|
+
rightJoin(table: string, first: string, op: string, second: string): this;
|
|
149
|
+
where(callback: (query: ModelQuery<T>) => void): this;
|
|
150
|
+
where(column: string, value: unknown): this;
|
|
151
|
+
where(column: string, op: string, value: unknown): this;
|
|
152
|
+
orWhere(callback: (query: ModelQuery<T>) => void): this;
|
|
153
|
+
orWhere(column: string, value: unknown): this;
|
|
154
|
+
orWhere(column: string, op: string, value: unknown): this;
|
|
155
|
+
whereIn(column: string, values: unknown[]): this;
|
|
156
|
+
orWhereIn(column: string, values: unknown[]): this;
|
|
157
|
+
whereNotIn(column: string, values: unknown[]): this;
|
|
158
|
+
orWhereNotIn(column: string, values: unknown[]): this;
|
|
159
|
+
whereNull(column: string): this;
|
|
160
|
+
orWhereNull(column: string): this;
|
|
161
|
+
whereNotNull(column: string): this;
|
|
162
|
+
orWhereNotNull(column: string): this;
|
|
163
|
+
whereBetween(column: string, values: [unknown, unknown]): this;
|
|
164
|
+
orWhereBetween(column: string, values: [unknown, unknown]): this;
|
|
165
|
+
whereNotBetween(column: string, values: [unknown, unknown]): this;
|
|
166
|
+
orWhereNotBetween(column: string, values: [unknown, unknown]): this;
|
|
167
|
+
whereColumn(first: string, second: string): this;
|
|
168
|
+
whereColumn(first: string, op: string, second: string): this;
|
|
169
|
+
orWhereColumn(first: string, second: string): this;
|
|
170
|
+
orWhereColumn(first: string, op: string, second: string): this;
|
|
171
|
+
whereRaw(sql: string, bindings?: unknown[]): this;
|
|
172
|
+
orWhereRaw(sql: string, bindings?: unknown[]): this;
|
|
173
|
+
whereLike(column: string, value: string, caseSensitive?: boolean): this;
|
|
174
|
+
orWhereLike(column: string, value: string, caseSensitive?: boolean): this;
|
|
175
|
+
whereNotLike(column: string, value: string, caseSensitive?: boolean): this;
|
|
176
|
+
orWhereNotLike(column: string, value: string, caseSensitive?: boolean): this;
|
|
177
|
+
/** Laravel `whereDate` — same on SQLite / Postgres / MySQL. */
|
|
178
|
+
whereDate(column: string, value: DateInput): this;
|
|
179
|
+
whereDate(column: string, op: string, value: DateInput): this;
|
|
180
|
+
whereYear(column: string, value: number): this;
|
|
181
|
+
whereMonth(column: string, value: number): this;
|
|
182
|
+
whereDay(column: string, value: number): this;
|
|
183
|
+
select(...columns: string[]): this;
|
|
184
|
+
addSelect(...columns: string[]): this;
|
|
185
|
+
selectRaw(expression: string, bindings?: unknown[]): this;
|
|
186
|
+
distinct(value?: boolean): this;
|
|
187
|
+
orderBy(column: string, direction?: "asc" | "desc"): this;
|
|
188
|
+
orderByDesc(column: string): this;
|
|
189
|
+
orderByRaw(sql: string): this;
|
|
190
|
+
/** Karobar / dialect alias for `orderByRaw`. */
|
|
191
|
+
orderBySql(sql: string): this;
|
|
192
|
+
reorder(column?: string, direction?: "asc" | "desc"): this;
|
|
193
|
+
inRandomOrder(): this;
|
|
194
|
+
latest(column?: string): this;
|
|
195
|
+
oldest(column?: string): this;
|
|
196
|
+
groupBy(...columns: string[]): this;
|
|
197
|
+
having(column: string, op: string, value: unknown): this;
|
|
198
|
+
havingRaw(sql: string, bindings?: unknown[]): this;
|
|
199
|
+
limit(value: number): this;
|
|
200
|
+
take(value: number): this;
|
|
201
|
+
offset(value: number): this;
|
|
202
|
+
skip(value: number): this;
|
|
203
|
+
forPage(page: number, perPage?: number): this;
|
|
204
|
+
lockForUpdate(): this;
|
|
205
|
+
sharedLock(): this;
|
|
206
|
+
when(condition: unknown, callback: (query: this) => void, defaultCallback?: (query: this) => void): this;
|
|
207
|
+
/**
|
|
208
|
+
* OR `LIKE %term%` across columns (Karobar list `search`).
|
|
209
|
+
* Empty/whitespace term is a no-op.
|
|
210
|
+
*/
|
|
211
|
+
search(columns: string[], term: string): this;
|
|
212
|
+
unless(condition: unknown, callback: (query: this) => void, defaultCallback?: (query: this) => void): this;
|
|
213
|
+
tap(callback: (query: this) => void): this;
|
|
214
|
+
clone(): ModelQuery<T, TResult>;
|
|
215
|
+
with(...relations: Array<string | string[] | Record<string, unknown>>): this;
|
|
216
|
+
/** Underlying query builder (fresh compile each call). */
|
|
217
|
+
toBase(): QueryBuilder;
|
|
218
|
+
/** Compiled SQL (bindings via `getBindings()`). */
|
|
219
|
+
toSql(): string;
|
|
220
|
+
/** SQL with bindings interpolated for debugging. */
|
|
221
|
+
toRawSql(): string;
|
|
222
|
+
getBindings(): unknown[];
|
|
223
|
+
dump(): this;
|
|
224
|
+
dd(): never;
|
|
225
|
+
/**
|
|
226
|
+
* Prefix unqualified columns with `table.` (BelongsTo whereHas → JOIN path).
|
|
227
|
+
*/
|
|
228
|
+
qualifyColumns(table: string): this;
|
|
229
|
+
/** Apply this query's wheres onto a QueryBuilder (exists subqueries). */
|
|
230
|
+
applyConstraintsTo(q: QueryBuilder): QueryBuilder;
|
|
231
|
+
first(): T | null | Promise<T | null>;
|
|
232
|
+
/** Laravel `firstOrFail`. */
|
|
233
|
+
firstOrFail(): Promise<T>;
|
|
234
|
+
/**
|
|
235
|
+
* Fetch matching models as an {@link OrmCollection}.
|
|
236
|
+
* After {@link rows}, returns plain row objects and does not build models.
|
|
237
|
+
* For synchronous SQLite reads, use {@link getSync}.
|
|
238
|
+
*/
|
|
239
|
+
get(): TResult extends "row" ? Record<string, unknown>[] | Promise<Record<string, unknown>[]> : OrmCollection<T> | Promise<OrmCollection<T>>;
|
|
240
|
+
/**
|
|
241
|
+
* SQLite-only synchronous `get()`.
|
|
242
|
+
* No `with()` / retrieved events — for desktop hot paths that cannot await.
|
|
243
|
+
*/
|
|
244
|
+
getSync(): TResult extends "row" ? Record<string, unknown>[] : OrmCollection<T>;
|
|
245
|
+
/** SQLite-only synchronous `first()`. */
|
|
246
|
+
firstSync(): T | null;
|
|
247
|
+
/** SQLite-only synchronous `find($id)`. */
|
|
248
|
+
findSync(id: string | number): T | null;
|
|
249
|
+
/** Laravel `Builder::create` — insert on this query's connection. */
|
|
250
|
+
create(attributes: Record<string, unknown>): Promise<T>;
|
|
251
|
+
paginate(perPage?: number, page?: number, options?: {
|
|
252
|
+
path?: string;
|
|
253
|
+
pageName?: string;
|
|
254
|
+
}): Promise<LengthAwarePaginator<T>>;
|
|
255
|
+
/** No total count; extra row is used to detect a next page. */
|
|
256
|
+
simplePaginate(perPage?: number, page?: number, options?: {
|
|
257
|
+
path?: string;
|
|
258
|
+
pageName?: string;
|
|
259
|
+
}): Promise<Paginator<T>>;
|
|
260
|
+
/** Laravel `chunk($count, $callback)`. */
|
|
261
|
+
chunk(count: number, callback: (models: OrmCollection<T>) => void | Promise<void>): Promise<void>;
|
|
262
|
+
/** Laravel `lazy($chunkSize)`. */
|
|
263
|
+
lazy(chunkSize?: number): AsyncGenerator<T, void, unknown>;
|
|
264
|
+
/** Laravel `chunkById`. */
|
|
265
|
+
chunkById(count: number, callback: (models: OrmCollection<T>) => void | boolean | Promise<void | boolean>, column?: string): Promise<boolean>;
|
|
266
|
+
chunkByIdDesc(count: number, callback: (models: OrmCollection<T>) => void | boolean | Promise<void | boolean>, column?: string): Promise<boolean>;
|
|
267
|
+
/** Laravel `lazyById`. */
|
|
268
|
+
lazyById(chunkSize?: number, column?: string): AsyncGenerator<T, void, unknown>;
|
|
269
|
+
lazyByIdDesc(chunkSize?: number, column?: string): AsyncGenerator<T, void, unknown>;
|
|
270
|
+
increment(column: string, amount?: number): Promise<void>;
|
|
271
|
+
decrement(column: string, amount?: number): Promise<void>;
|
|
272
|
+
/** Laravel `cursorPaginate`. */
|
|
273
|
+
cursorPaginate(perPage?: number, cursor?: string | null, options?: {
|
|
274
|
+
path?: string;
|
|
275
|
+
cursorName?: string;
|
|
276
|
+
}): Promise<CursorPaginator<T>>;
|
|
277
|
+
/** Laravel `Builder::count($columns = '*')` — honors `distinct()` for non-`*`. */
|
|
278
|
+
count(column?: string): Promise<number>;
|
|
279
|
+
exists(): Promise<boolean>;
|
|
280
|
+
doesntExist(): Promise<boolean>;
|
|
281
|
+
/** Find by primary key within this query. */
|
|
282
|
+
find(id: string | number): Promise<T | null>;
|
|
283
|
+
findOrFail(id: string | number): Promise<T>;
|
|
284
|
+
/** Exactly one matching model, or throw. */
|
|
285
|
+
sole(): Promise<T>;
|
|
286
|
+
value(column: string): Promise<unknown>;
|
|
287
|
+
/**
|
|
288
|
+
* Laravel `Builder::pluck($column, $key = null)`.
|
|
289
|
+
* One column → list {@link Collection}. With `key`, selects both columns and
|
|
290
|
+
* returns a keyed plain object via {@link Collection.pluck} (Laravel assoc map).
|
|
291
|
+
*/
|
|
292
|
+
pluck(column: string): Promise<Collection<unknown>>;
|
|
293
|
+
pluck(column: string, key: string): Promise<Record<string, unknown>>;
|
|
294
|
+
sum(column: string): Promise<number>;
|
|
295
|
+
avg(column: string): Promise<number | null>;
|
|
296
|
+
min(column: string): Promise<unknown>;
|
|
297
|
+
max(column: string): Promise<unknown>;
|
|
298
|
+
/**
|
|
299
|
+
* Bulk insert. When the model uses timestamps, stamps `created_at`/`updated_at`
|
|
300
|
+
* (row values win). Does not fire creating/created events.
|
|
301
|
+
*/
|
|
302
|
+
insert(values: Record<string, unknown> | Record<string, unknown>[]): Promise<boolean>;
|
|
303
|
+
/**
|
|
304
|
+
* Laravel `Builder::upsert` — insert or update on unique conflict.
|
|
305
|
+
* When the model uses timestamps, stamps `created_at`/`updated_at` like Eloquent
|
|
306
|
+
* (row values win; `updated_at` is always included in the update column list).
|
|
307
|
+
*/
|
|
308
|
+
upsert(values: Record<string, unknown> | Record<string, unknown>[], uniqueBy: string | string[], update?: string[] | null): Promise<number>;
|
|
309
|
+
update(values: Record<string, unknown>): Promise<number>;
|
|
310
|
+
delete(): Promise<number>;
|
|
311
|
+
forceDelete(): Promise<number>;
|
|
312
|
+
}
|