zitejs 0.9.65 → 0.9.66
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.
|
@@ -4,8 +4,11 @@ export interface BulkCreateResult<T> {
|
|
|
4
4
|
success: boolean;
|
|
5
5
|
records: T[];
|
|
6
6
|
}
|
|
7
|
+
export interface UpdateResult<T> {
|
|
8
|
+
id: string;
|
|
9
|
+
fields: Partial<T>;
|
|
10
|
+
}
|
|
7
11
|
export interface DeleteResult {
|
|
8
|
-
success: boolean;
|
|
9
12
|
id: string;
|
|
10
13
|
}
|
|
11
14
|
export interface TableClient<T> {
|
|
@@ -28,7 +31,7 @@ export interface TableClient<T> {
|
|
|
28
31
|
}): Promise<T>;
|
|
29
32
|
update(id: string, data: {
|
|
30
33
|
record: Partial<T>;
|
|
31
|
-
}): Promise<T
|
|
34
|
+
}): Promise<UpdateResult<T>>;
|
|
32
35
|
delete(id: string): Promise<DeleteResult>;
|
|
33
36
|
bulkCreate(records: Partial<T>[]): Promise<BulkCreateResult<T>>;
|
|
34
37
|
}
|
package/dist/cjs/sync/lib.js
CHANGED
|
@@ -306,8 +306,8 @@ function generateDbTs(schema) {
|
|
|
306
306
|
lines.push("// opts: { limit?, offset?, sort?, filter?, filters? }");
|
|
307
307
|
lines.push("// .findOne(id | { filters }) → T | undefined");
|
|
308
308
|
lines.push("// .create({ record }) → T");
|
|
309
|
-
lines.push("// .update(id, { record }) → T");
|
|
310
|
-
lines.push("// .delete(id) → {
|
|
309
|
+
lines.push("// .update(id, { record }) → { id: string, fields: Partial<T> }");
|
|
310
|
+
lines.push("// .delete(id) → { id: string }");
|
|
311
311
|
lines.push("// .bulkCreate(records) → { success: boolean, records: T[] }");
|
|
312
312
|
lines.push("//");
|
|
313
313
|
lines.push("// Raw SQL (read-only SELECTs for aggregates, joins, multi-table queries):");
|
|
@@ -4,8 +4,11 @@ export interface BulkCreateResult<T> {
|
|
|
4
4
|
success: boolean;
|
|
5
5
|
records: T[];
|
|
6
6
|
}
|
|
7
|
+
export interface UpdateResult<T> {
|
|
8
|
+
id: string;
|
|
9
|
+
fields: Partial<T>;
|
|
10
|
+
}
|
|
7
11
|
export interface DeleteResult {
|
|
8
|
-
success: boolean;
|
|
9
12
|
id: string;
|
|
10
13
|
}
|
|
11
14
|
export interface TableClient<T> {
|
|
@@ -28,7 +31,7 @@ export interface TableClient<T> {
|
|
|
28
31
|
}): Promise<T>;
|
|
29
32
|
update(id: string, data: {
|
|
30
33
|
record: Partial<T>;
|
|
31
|
-
}): Promise<T
|
|
34
|
+
}): Promise<UpdateResult<T>>;
|
|
32
35
|
delete(id: string): Promise<DeleteResult>;
|
|
33
36
|
bulkCreate(records: Partial<T>[]): Promise<BulkCreateResult<T>>;
|
|
34
37
|
}
|
package/dist/esm/sync/lib.js
CHANGED
|
@@ -295,8 +295,8 @@ export function generateDbTs(schema) {
|
|
|
295
295
|
lines.push("// opts: { limit?, offset?, sort?, filter?, filters? }");
|
|
296
296
|
lines.push("// .findOne(id | { filters }) → T | undefined");
|
|
297
297
|
lines.push("// .create({ record }) → T");
|
|
298
|
-
lines.push("// .update(id, { record }) → T");
|
|
299
|
-
lines.push("// .delete(id) → {
|
|
298
|
+
lines.push("// .update(id, { record }) → { id: string, fields: Partial<T> }");
|
|
299
|
+
lines.push("// .delete(id) → { id: string }");
|
|
300
300
|
lines.push("// .bulkCreate(records) → { success: boolean, records: T[] }");
|
|
301
301
|
lines.push("//");
|
|
302
302
|
lines.push("// Raw SQL (read-only SELECTs for aggregates, joins, multi-table queries):");
|