@supabase/postgrest-js 2.102.0-beta.0 → 2.102.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +25 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/PostgrestBuilder.ts +10 -1
- package/src/PostgrestError.ts +10 -0
- package/src/PostgrestQueryBuilder.ts +39 -7
- package/src/types/types.ts +8 -0
- package/src/version.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -56,6 +56,15 @@ var PostgrestError = class extends Error {
|
|
|
56
56
|
this.hint = context.hint;
|
|
57
57
|
this.code = context.code;
|
|
58
58
|
}
|
|
59
|
+
toJSON() {
|
|
60
|
+
return {
|
|
61
|
+
name: this.name,
|
|
62
|
+
message: this.message,
|
|
63
|
+
details: this.details,
|
|
64
|
+
hint: this.hint,
|
|
65
|
+
code: this.code
|
|
66
|
+
};
|
|
67
|
+
}
|
|
59
68
|
};
|
|
60
69
|
|
|
61
70
|
//#endregion
|
|
@@ -251,6 +260,7 @@ var PostgrestBuilder = class {
|
|
|
251
260
|
if (urlLength > this.urlLengthLimit) hint += `. Your request URL is ${urlLength} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`;
|
|
252
261
|
}
|
|
253
262
|
return {
|
|
263
|
+
success: false,
|
|
254
264
|
error: {
|
|
255
265
|
message: `${(_fetchError$name2 = fetchError === null || fetchError === void 0 ? void 0 : fetchError.name) !== null && _fetchError$name2 !== void 0 ? _fetchError$name2 : "FetchError"}: ${fetchError === null || fetchError === void 0 ? void 0 : fetchError.message}`,
|
|
256
266
|
details: errorDetails,
|
|
@@ -319,6 +329,7 @@ var PostgrestBuilder = class {
|
|
|
319
329
|
if (error && _this2.shouldThrowOnError) throw new PostgrestError(error);
|
|
320
330
|
}
|
|
321
331
|
return {
|
|
332
|
+
success: error === null,
|
|
322
333
|
error,
|
|
323
334
|
data,
|
|
324
335
|
count,
|