@supabase/postgrest-js 2.71.2-canary.29 → 2.71.2-canary.3

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.
Files changed (58) hide show
  1. package/package.json +1 -1
  2. package/dist/cjs/PostgrestBuilder.d.ts +0 -71
  3. package/dist/cjs/PostgrestBuilder.d.ts.map +0 -1
  4. package/dist/cjs/PostgrestBuilder.js +0 -222
  5. package/dist/cjs/PostgrestBuilder.js.map +0 -1
  6. package/dist/cjs/PostgrestClient.d.ts +0 -74
  7. package/dist/cjs/PostgrestClient.d.ts.map +0 -1
  8. package/dist/cjs/PostgrestClient.js +0 -121
  9. package/dist/cjs/PostgrestClient.js.map +0 -1
  10. package/dist/cjs/PostgrestError.d.ts +0 -17
  11. package/dist/cjs/PostgrestError.d.ts.map +0 -1
  12. package/dist/cjs/PostgrestError.js +0 -18
  13. package/dist/cjs/PostgrestError.js.map +0 -1
  14. package/dist/cjs/PostgrestFilterBuilder.d.ts +0 -108
  15. package/dist/cjs/PostgrestFilterBuilder.d.ts.map +0 -1
  16. package/dist/cjs/PostgrestFilterBuilder.js +0 -381
  17. package/dist/cjs/PostgrestFilterBuilder.js.map +0 -1
  18. package/dist/cjs/PostgrestQueryBuilder.d.ts +0 -117
  19. package/dist/cjs/PostgrestQueryBuilder.d.ts.map +0 -1
  20. package/dist/cjs/PostgrestQueryBuilder.js +0 -251
  21. package/dist/cjs/PostgrestQueryBuilder.js.map +0 -1
  22. package/dist/cjs/PostgrestTransformBuilder.d.ts +0 -157
  23. package/dist/cjs/PostgrestTransformBuilder.d.ts.map +0 -1
  24. package/dist/cjs/PostgrestTransformBuilder.js +0 -226
  25. package/dist/cjs/PostgrestTransformBuilder.js.map +0 -1
  26. package/dist/cjs/constants.d.ts +0 -4
  27. package/dist/cjs/constants.d.ts.map +0 -1
  28. package/dist/cjs/constants.js +0 -6
  29. package/dist/cjs/constants.js.map +0 -1
  30. package/dist/cjs/index.d.ts +0 -19
  31. package/dist/cjs/index.d.ts.map +0 -1
  32. package/dist/cjs/index.js +0 -28
  33. package/dist/cjs/index.js.map +0 -1
  34. package/dist/cjs/select-query-parser/parser.d.ts +0 -258
  35. package/dist/cjs/select-query-parser/parser.d.ts.map +0 -1
  36. package/dist/cjs/select-query-parser/parser.js +0 -5
  37. package/dist/cjs/select-query-parser/parser.js.map +0 -1
  38. package/dist/cjs/select-query-parser/result.d.ts +0 -157
  39. package/dist/cjs/select-query-parser/result.d.ts.map +0 -1
  40. package/dist/cjs/select-query-parser/result.js +0 -3
  41. package/dist/cjs/select-query-parser/result.js.map +0 -1
  42. package/dist/cjs/select-query-parser/types.d.ts +0 -31
  43. package/dist/cjs/select-query-parser/types.d.ts.map +0 -1
  44. package/dist/cjs/select-query-parser/types.js +0 -3
  45. package/dist/cjs/select-query-parser/types.js.map +0 -1
  46. package/dist/cjs/select-query-parser/utils.d.ts +0 -264
  47. package/dist/cjs/select-query-parser/utils.d.ts.map +0 -1
  48. package/dist/cjs/select-query-parser/utils.js +0 -3
  49. package/dist/cjs/select-query-parser/utils.js.map +0 -1
  50. package/dist/cjs/types.d.ts +0 -106
  51. package/dist/cjs/types.d.ts.map +0 -1
  52. package/dist/cjs/types.js +0 -3
  53. package/dist/cjs/types.js.map +0 -1
  54. package/dist/cjs/version.d.ts +0 -2
  55. package/dist/cjs/version.d.ts.map +0 -1
  56. package/dist/cjs/version.js +0 -5
  57. package/dist/cjs/version.js.map +0 -1
  58. package/dist/esm/wrapper.mjs +0 -28
@@ -1,251 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const PostgrestFilterBuilder_1 = __importDefault(require("./PostgrestFilterBuilder"));
7
- class PostgrestQueryBuilder {
8
- constructor(url, { headers = {}, schema, fetch, }) {
9
- this.url = url;
10
- this.headers = new Headers(headers);
11
- this.schema = schema;
12
- this.fetch = fetch;
13
- }
14
- /**
15
- * Perform a SELECT query on the table or view.
16
- *
17
- * @param columns - The columns to retrieve, separated by commas. Columns can be renamed when returned with `customName:columnName`
18
- *
19
- * @param options - Named parameters
20
- *
21
- * @param options.head - When set to `true`, `data` will not be returned.
22
- * Useful if you only need the count.
23
- *
24
- * @param options.count - Count algorithm to use to count rows in the table or view.
25
- *
26
- * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
27
- * hood.
28
- *
29
- * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
30
- * statistics under the hood.
31
- *
32
- * `"estimated"`: Uses exact count for low numbers and planned count for high
33
- * numbers.
34
- */
35
- select(columns, { head = false, count, } = {}) {
36
- const method = head ? 'HEAD' : 'GET';
37
- // Remove whitespaces except when quoted
38
- let quoted = false;
39
- const cleanedColumns = (columns !== null && columns !== void 0 ? columns : '*')
40
- .split('')
41
- .map((c) => {
42
- if (/\s/.test(c) && !quoted) {
43
- return '';
44
- }
45
- if (c === '"') {
46
- quoted = !quoted;
47
- }
48
- return c;
49
- })
50
- .join('');
51
- this.url.searchParams.set('select', cleanedColumns);
52
- if (count) {
53
- this.headers.append('Prefer', `count=${count}`);
54
- }
55
- return new PostgrestFilterBuilder_1.default({
56
- method,
57
- url: this.url,
58
- headers: this.headers,
59
- schema: this.schema,
60
- fetch: this.fetch,
61
- });
62
- }
63
- /**
64
- * Perform an INSERT into the table or view.
65
- *
66
- * By default, inserted rows are not returned. To return it, chain the call
67
- * with `.select()`.
68
- *
69
- * @param values - The values to insert. Pass an object to insert a single row
70
- * or an array to insert multiple rows.
71
- *
72
- * @param options - Named parameters
73
- *
74
- * @param options.count - Count algorithm to use to count inserted rows.
75
- *
76
- * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
77
- * hood.
78
- *
79
- * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
80
- * statistics under the hood.
81
- *
82
- * `"estimated"`: Uses exact count for low numbers and planned count for high
83
- * numbers.
84
- *
85
- * @param options.defaultToNull - Make missing fields default to `null`.
86
- * Otherwise, use the default value for the column. Only applies for bulk
87
- * inserts.
88
- */
89
- insert(values, { count, defaultToNull = true, } = {}) {
90
- var _a;
91
- const method = 'POST';
92
- if (count) {
93
- this.headers.append('Prefer', `count=${count}`);
94
- }
95
- if (!defaultToNull) {
96
- this.headers.append('Prefer', `missing=default`);
97
- }
98
- if (Array.isArray(values)) {
99
- const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), []);
100
- if (columns.length > 0) {
101
- const uniqueColumns = [...new Set(columns)].map((column) => `"${column}"`);
102
- this.url.searchParams.set('columns', uniqueColumns.join(','));
103
- }
104
- }
105
- return new PostgrestFilterBuilder_1.default({
106
- method,
107
- url: this.url,
108
- headers: this.headers,
109
- schema: this.schema,
110
- body: values,
111
- fetch: (_a = this.fetch) !== null && _a !== void 0 ? _a : fetch,
112
- });
113
- }
114
- /**
115
- * Perform an UPSERT on the table or view. Depending on the column(s) passed
116
- * to `onConflict`, `.upsert()` allows you to perform the equivalent of
117
- * `.insert()` if a row with the corresponding `onConflict` columns doesn't
118
- * exist, or if it does exist, perform an alternative action depending on
119
- * `ignoreDuplicates`.
120
- *
121
- * By default, upserted rows are not returned. To return it, chain the call
122
- * with `.select()`.
123
- *
124
- * @param values - The values to upsert with. Pass an object to upsert a
125
- * single row or an array to upsert multiple rows.
126
- *
127
- * @param options - Named parameters
128
- *
129
- * @param options.onConflict - Comma-separated UNIQUE column(s) to specify how
130
- * duplicate rows are determined. Two rows are duplicates if all the
131
- * `onConflict` columns are equal.
132
- *
133
- * @param options.ignoreDuplicates - If `true`, duplicate rows are ignored. If
134
- * `false`, duplicate rows are merged with existing rows.
135
- *
136
- * @param options.count - Count algorithm to use to count upserted rows.
137
- *
138
- * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
139
- * hood.
140
- *
141
- * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
142
- * statistics under the hood.
143
- *
144
- * `"estimated"`: Uses exact count for low numbers and planned count for high
145
- * numbers.
146
- *
147
- * @param options.defaultToNull - Make missing fields default to `null`.
148
- * Otherwise, use the default value for the column. This only applies when
149
- * inserting new rows, not when merging with existing rows under
150
- * `ignoreDuplicates: false`. This also only applies when doing bulk upserts.
151
- */
152
- upsert(values, { onConflict, ignoreDuplicates = false, count, defaultToNull = true, } = {}) {
153
- var _a;
154
- const method = 'POST';
155
- this.headers.append('Prefer', `resolution=${ignoreDuplicates ? 'ignore' : 'merge'}-duplicates`);
156
- if (onConflict !== undefined)
157
- this.url.searchParams.set('on_conflict', onConflict);
158
- if (count) {
159
- this.headers.append('Prefer', `count=${count}`);
160
- }
161
- if (!defaultToNull) {
162
- this.headers.append('Prefer', 'missing=default');
163
- }
164
- if (Array.isArray(values)) {
165
- const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), []);
166
- if (columns.length > 0) {
167
- const uniqueColumns = [...new Set(columns)].map((column) => `"${column}"`);
168
- this.url.searchParams.set('columns', uniqueColumns.join(','));
169
- }
170
- }
171
- return new PostgrestFilterBuilder_1.default({
172
- method,
173
- url: this.url,
174
- headers: this.headers,
175
- schema: this.schema,
176
- body: values,
177
- fetch: (_a = this.fetch) !== null && _a !== void 0 ? _a : fetch,
178
- });
179
- }
180
- /**
181
- * Perform an UPDATE on the table or view.
182
- *
183
- * By default, updated rows are not returned. To return it, chain the call
184
- * with `.select()` after filters.
185
- *
186
- * @param values - The values to update with
187
- *
188
- * @param options - Named parameters
189
- *
190
- * @param options.count - Count algorithm to use to count updated rows.
191
- *
192
- * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
193
- * hood.
194
- *
195
- * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
196
- * statistics under the hood.
197
- *
198
- * `"estimated"`: Uses exact count for low numbers and planned count for high
199
- * numbers.
200
- */
201
- update(values, { count, } = {}) {
202
- var _a;
203
- const method = 'PATCH';
204
- if (count) {
205
- this.headers.append('Prefer', `count=${count}`);
206
- }
207
- return new PostgrestFilterBuilder_1.default({
208
- method,
209
- url: this.url,
210
- headers: this.headers,
211
- schema: this.schema,
212
- body: values,
213
- fetch: (_a = this.fetch) !== null && _a !== void 0 ? _a : fetch,
214
- });
215
- }
216
- /**
217
- * Perform a DELETE on the table or view.
218
- *
219
- * By default, deleted rows are not returned. To return it, chain the call
220
- * with `.select()` after filters.
221
- *
222
- * @param options - Named parameters
223
- *
224
- * @param options.count - Count algorithm to use to count deleted rows.
225
- *
226
- * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
227
- * hood.
228
- *
229
- * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
230
- * statistics under the hood.
231
- *
232
- * `"estimated"`: Uses exact count for low numbers and planned count for high
233
- * numbers.
234
- */
235
- delete({ count, } = {}) {
236
- var _a;
237
- const method = 'DELETE';
238
- if (count) {
239
- this.headers.append('Prefer', `count=${count}`);
240
- }
241
- return new PostgrestFilterBuilder_1.default({
242
- method,
243
- url: this.url,
244
- headers: this.headers,
245
- schema: this.schema,
246
- fetch: (_a = this.fetch) !== null && _a !== void 0 ? _a : fetch,
247
- });
248
- }
249
- }
250
- exports.default = PostgrestQueryBuilder;
251
- //# sourceMappingURL=PostgrestQueryBuilder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PostgrestQueryBuilder.js","sourceRoot":"","sources":["../../src/PostgrestQueryBuilder.ts"],"names":[],"mappings":";;;;;AAAA,sFAA6D;AAI7D,MAAqB,qBAAqB;IAaxC,YACE,GAAQ,EACR,EACE,OAAO,GAAG,EAAE,EACZ,MAAM,EACN,KAAK,GAKN;QAED,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM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InvalidMethodError } from './PostgrestFilterBuilder';
3
- import { GetResult } from './select-query-parser/result';
4
- import { GenericSchema, CheckMatchingArrayTypes, ClientServerOptions, MaxAffectedEnabled } from './types';
5
- export default class PostgrestTransformBuilder<ClientOptions extends ClientServerOptions, Schema extends GenericSchema, Row extends Record<string, unknown>, Result, RelationName = unknown, Relationships = unknown, Method = unknown> extends PostgrestBuilder<ClientOptions, Result> {
6
- /**
7
- * Perform a SELECT on the query result.
8
- *
9
- * By default, `.insert()`, `.update()`, `.upsert()`, and `.delete()` do not
10
- * return modified rows. By calling this method, modified rows are returned in
11
- * `data`.
12
- *
13
- * @param columns - The columns to retrieve, separated by commas
14
- */
15
- select<Query extends string = '*', NewResultOne = GetResult<Schema, Row, RelationName, Relationships, Query, ClientOptions>>(columns?: Query): PostgrestTransformBuilder<ClientOptions, Schema, Row, NewResultOne[], RelationName, Relationships, Method>;
16
- order<ColumnName extends string & keyof Row>(column: ColumnName, options?: {
17
- ascending?: boolean;
18
- nullsFirst?: boolean;
19
- referencedTable?: undefined;
20
- }): this;
21
- order(column: string, options?: {
22
- ascending?: boolean;
23
- nullsFirst?: boolean;
24
- referencedTable?: string;
25
- }): this;
26
- /**
27
- * @deprecated Use `options.referencedTable` instead of `options.foreignTable`
28
- */
29
- order<ColumnName extends string & keyof Row>(column: ColumnName, options?: {
30
- ascending?: boolean;
31
- nullsFirst?: boolean;
32
- foreignTable?: undefined;
33
- }): this;
34
- /**
35
- * @deprecated Use `options.referencedTable` instead of `options.foreignTable`
36
- */
37
- order(column: string, options?: {
38
- ascending?: boolean;
39
- nullsFirst?: boolean;
40
- foreignTable?: string;
41
- }): this;
42
- /**
43
- * Limit the query result by `count`.
44
- *
45
- * @param count - The maximum number of rows to return
46
- * @param options - Named parameters
47
- * @param options.referencedTable - Set this to limit rows of referenced
48
- * tables instead of the parent table
49
- * @param options.foreignTable - Deprecated, use `options.referencedTable`
50
- * instead
51
- */
52
- limit(count: number, { foreignTable, referencedTable, }?: {
53
- foreignTable?: string;
54
- referencedTable?: string;
55
- }): this;
56
- /**
57
- * Limit the query result by starting at an offset `from` and ending at the offset `to`.
58
- * Only records within this range are returned.
59
- * This respects the query order and if there is no order clause the range could behave unexpectedly.
60
- * The `from` and `to` values are 0-based and inclusive: `range(1, 3)` will include the second, third
61
- * and fourth rows of the query.
62
- *
63
- * @param from - The starting index from which to limit the result
64
- * @param to - The last index to which to limit the result
65
- * @param options - Named parameters
66
- * @param options.referencedTable - Set this to limit rows of referenced
67
- * tables instead of the parent table
68
- * @param options.foreignTable - Deprecated, use `options.referencedTable`
69
- * instead
70
- */
71
- range(from: number, to: number, { foreignTable, referencedTable, }?: {
72
- foreignTable?: string;
73
- referencedTable?: string;
74
- }): this;
75
- /**
76
- * Set the AbortSignal for the fetch request.
77
- *
78
- * @param signal - The AbortSignal to use for the fetch request
79
- */
80
- abortSignal(signal: AbortSignal): this;
81
- /**
82
- * Return `data` as a single object instead of an array of objects.
83
- *
84
- * Query result must be one row (e.g. using `.limit(1)`), otherwise this
85
- * returns an error.
86
- */
87
- single<ResultOne = Result extends (infer ResultOne)[] ? ResultOne : never>(): PostgrestBuilder<ClientOptions, ResultOne>;
88
- /**
89
- * Return `data` as a single object instead of an array of objects.
90
- *
91
- * Query result must be zero or one row (e.g. using `.limit(1)`), otherwise
92
- * this returns an error.
93
- */
94
- maybeSingle<ResultOne = Result extends (infer ResultOne)[] ? ResultOne : never>(): PostgrestBuilder<ClientOptions, ResultOne | null>;
95
- /**
96
- * Return `data` as a string in CSV format.
97
- */
98
- csv(): PostgrestBuilder<ClientOptions, string>;
99
- /**
100
- * Return `data` as an object in [GeoJSON](https://geojson.org) format.
101
- */
102
- geojson(): PostgrestBuilder<ClientOptions, Record<string, unknown>>;
103
- /**
104
- * Return `data` as the EXPLAIN plan for the query.
105
- *
106
- * You need to enable the
107
- * [db_plan_enabled](https://supabase.com/docs/guides/database/debugging-performance#enabling-explain)
108
- * setting before using this method.
109
- *
110
- * @param options - Named parameters
111
- *
112
- * @param options.analyze - If `true`, the query will be executed and the
113
- * actual run time will be returned
114
- *
115
- * @param options.verbose - If `true`, the query identifier will be returned
116
- * and `data` will include the output columns of the query
117
- *
118
- * @param options.settings - If `true`, include information on configuration
119
- * parameters that affect query planning
120
- *
121
- * @param options.buffers - If `true`, include information on buffer usage
122
- *
123
- * @param options.wal - If `true`, include information on WAL record generation
124
- *
125
- * @param options.format - The format of the output, can be `"text"` (default)
126
- * or `"json"`
127
- */
128
- explain({ analyze, verbose, settings, buffers, wal, format, }?: {
129
- analyze?: boolean;
130
- verbose?: boolean;
131
- settings?: boolean;
132
- buffers?: boolean;
133
- wal?: boolean;
134
- format?: 'json' | 'text';
135
- }): PostgrestBuilder<ClientOptions, string, false> | PostgrestBuilder<ClientOptions, Record<string, unknown>[], false>;
136
- /**
137
- * Rollback the query.
138
- *
139
- * `data` will still be returned, but the query is not committed.
140
- */
141
- rollback(): this;
142
- /**
143
- * Override the type of the returned `data`.
144
- *
145
- * @typeParam NewResult - The new result type to override with
146
- * @deprecated Use overrideTypes<yourType, { merge: false }>() method at the end of your call chain instead
147
- */
148
- returns<NewResult>(): PostgrestTransformBuilder<ClientOptions, Schema, Row, CheckMatchingArrayTypes<Result, NewResult>, RelationName, Relationships, Method>;
149
- /**
150
- * Set the maximum number of rows that can be affected by the query.
151
- * Only available in PostgREST v13+ and only works with PATCH and DELETE methods.
152
- *
153
- * @param value - The maximum number of rows that can be affected
154
- */
155
- maxAffected(value: number): MaxAffectedEnabled<ClientOptions['PostgrestVersion']> extends true ? Method extends 'PATCH' | 'DELETE' | 'RPC' ? this : InvalidMethodError<'maxAffected method only available on update or delete'> : InvalidMethodError<'maxAffected method only available on postgrest 13+'>;
156
- }
157
- //# sourceMappingURL=PostgrestTransformBuilder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PostgrestTransformBuilder.d.ts","sourceRoot":"","sources":["../../src/PostgrestTransformBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MA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AG,IAAI,gBAAgB,CAAC,aAAa,EAAE,MAAM,CAAC;IAK9C;;OAEG;IACH,OAAO,IAAI,gBAAgB,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAKnE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,OAAO,CAAC,EACN,OAAe,EACf,OAAe,EACf,QAAgB,EAChB,OAAe,EACf,GAAW,EACX,MAAe,GAChB,GAAE;QACD,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,GAAG,CAAC,EAAE,OAAO,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KACpB;IAuBN;;;;OAIG;IACH,QAAQ,IAAI,IAAI;IAKhB;;;;;OAKG;IACH,OAAO,CAAC,SAAS,KAAK,yBAAyB,CAC7C,aAAa,EACb,MAAM,EACN,GAAG,EACH,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,EAC1C,YAAY,EACZ,aAAa,EACb,MAAM,CACP;IAYD;;;;;OAKG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,SAAS,IAAI,GAE1F,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,KAAK,GACvC,IAAI,GACJ,kBAAkB,CAAC,uDAAuD,CAAC,GAC7E,kBAAkB,CAAC,oDAAoD,CAAC;CAS7E"}
@@ -1,226 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const PostgrestBuilder_1 = __importDefault(require("./PostgrestBuilder"));
7
- class PostgrestTransformBuilder extends PostgrestBuilder_1.default {
8
- /**
9
- * Perform a SELECT on the query result.
10
- *
11
- * By default, `.insert()`, `.update()`, `.upsert()`, and `.delete()` do not
12
- * return modified rows. By calling this method, modified rows are returned in
13
- * `data`.
14
- *
15
- * @param columns - The columns to retrieve, separated by commas
16
- */
17
- select(columns) {
18
- // Remove whitespaces except when quoted
19
- let quoted = false;
20
- const cleanedColumns = (columns !== null && columns !== void 0 ? columns : '*')
21
- .split('')
22
- .map((c) => {
23
- if (/\s/.test(c) && !quoted) {
24
- return '';
25
- }
26
- if (c === '"') {
27
- quoted = !quoted;
28
- }
29
- return c;
30
- })
31
- .join('');
32
- this.url.searchParams.set('select', cleanedColumns);
33
- this.headers.append('Prefer', 'return=representation');
34
- return this;
35
- }
36
- /**
37
- * Order the query result by `column`.
38
- *
39
- * You can call this method multiple times to order by multiple columns.
40
- *
41
- * You can order referenced tables, but it only affects the ordering of the
42
- * parent table if you use `!inner` in the query.
43
- *
44
- * @param column - The column to order by
45
- * @param options - Named parameters
46
- * @param options.ascending - If `true`, the result will be in ascending order
47
- * @param options.nullsFirst - If `true`, `null`s appear first. If `false`,
48
- * `null`s appear last.
49
- * @param options.referencedTable - Set this to order a referenced table by
50
- * its columns
51
- * @param options.foreignTable - Deprecated, use `options.referencedTable`
52
- * instead
53
- */
54
- order(column, { ascending = true, nullsFirst, foreignTable, referencedTable = foreignTable, } = {}) {
55
- const key = referencedTable ? `${referencedTable}.order` : 'order';
56
- const existingOrder = this.url.searchParams.get(key);
57
- this.url.searchParams.set(key, `${existingOrder ? `${existingOrder},` : ''}${column}.${ascending ? 'asc' : 'desc'}${nullsFirst === undefined ? '' : nullsFirst ? '.nullsfirst' : '.nullslast'}`);
58
- return this;
59
- }
60
- /**
61
- * Limit the query result by `count`.
62
- *
63
- * @param count - The maximum number of rows to return
64
- * @param options - Named parameters
65
- * @param options.referencedTable - Set this to limit rows of referenced
66
- * tables instead of the parent table
67
- * @param options.foreignTable - Deprecated, use `options.referencedTable`
68
- * instead
69
- */
70
- limit(count, { foreignTable, referencedTable = foreignTable, } = {}) {
71
- const key = typeof referencedTable === 'undefined' ? 'limit' : `${referencedTable}.limit`;
72
- this.url.searchParams.set(key, `${count}`);
73
- return this;
74
- }
75
- /**
76
- * Limit the query result by starting at an offset `from` and ending at the offset `to`.
77
- * Only records within this range are returned.
78
- * This respects the query order and if there is no order clause the range could behave unexpectedly.
79
- * The `from` and `to` values are 0-based and inclusive: `range(1, 3)` will include the second, third
80
- * and fourth rows of the query.
81
- *
82
- * @param from - The starting index from which to limit the result
83
- * @param to - The last index to which to limit the result
84
- * @param options - Named parameters
85
- * @param options.referencedTable - Set this to limit rows of referenced
86
- * tables instead of the parent table
87
- * @param options.foreignTable - Deprecated, use `options.referencedTable`
88
- * instead
89
- */
90
- range(from, to, { foreignTable, referencedTable = foreignTable, } = {}) {
91
- const keyOffset = typeof referencedTable === 'undefined' ? 'offset' : `${referencedTable}.offset`;
92
- const keyLimit = typeof referencedTable === 'undefined' ? 'limit' : `${referencedTable}.limit`;
93
- this.url.searchParams.set(keyOffset, `${from}`);
94
- // Range is inclusive, so add 1
95
- this.url.searchParams.set(keyLimit, `${to - from + 1}`);
96
- return this;
97
- }
98
- /**
99
- * Set the AbortSignal for the fetch request.
100
- *
101
- * @param signal - The AbortSignal to use for the fetch request
102
- */
103
- abortSignal(signal) {
104
- this.signal = signal;
105
- return this;
106
- }
107
- /**
108
- * Return `data` as a single object instead of an array of objects.
109
- *
110
- * Query result must be one row (e.g. using `.limit(1)`), otherwise this
111
- * returns an error.
112
- */
113
- single() {
114
- this.headers.set('Accept', 'application/vnd.pgrst.object+json');
115
- return this;
116
- }
117
- /**
118
- * Return `data` as a single object instead of an array of objects.
119
- *
120
- * Query result must be zero or one row (e.g. using `.limit(1)`), otherwise
121
- * this returns an error.
122
- */
123
- maybeSingle() {
124
- // Temporary partial fix for https://github.com/supabase/postgrest-js/issues/361
125
- // Issue persists e.g. for `.insert([...]).select().maybeSingle()`
126
- if (this.method === 'GET') {
127
- this.headers.set('Accept', 'application/json');
128
- }
129
- else {
130
- this.headers.set('Accept', 'application/vnd.pgrst.object+json');
131
- }
132
- this.isMaybeSingle = true;
133
- return this;
134
- }
135
- /**
136
- * Return `data` as a string in CSV format.
137
- */
138
- csv() {
139
- this.headers.set('Accept', 'text/csv');
140
- return this;
141
- }
142
- /**
143
- * Return `data` as an object in [GeoJSON](https://geojson.org) format.
144
- */
145
- geojson() {
146
- this.headers.set('Accept', 'application/geo+json');
147
- return this;
148
- }
149
- /**
150
- * Return `data` as the EXPLAIN plan for the query.
151
- *
152
- * You need to enable the
153
- * [db_plan_enabled](https://supabase.com/docs/guides/database/debugging-performance#enabling-explain)
154
- * setting before using this method.
155
- *
156
- * @param options - Named parameters
157
- *
158
- * @param options.analyze - If `true`, the query will be executed and the
159
- * actual run time will be returned
160
- *
161
- * @param options.verbose - If `true`, the query identifier will be returned
162
- * and `data` will include the output columns of the query
163
- *
164
- * @param options.settings - If `true`, include information on configuration
165
- * parameters that affect query planning
166
- *
167
- * @param options.buffers - If `true`, include information on buffer usage
168
- *
169
- * @param options.wal - If `true`, include information on WAL record generation
170
- *
171
- * @param options.format - The format of the output, can be `"text"` (default)
172
- * or `"json"`
173
- */
174
- explain({ analyze = false, verbose = false, settings = false, buffers = false, wal = false, format = 'text', } = {}) {
175
- var _a;
176
- const options = [
177
- analyze ? 'analyze' : null,
178
- verbose ? 'verbose' : null,
179
- settings ? 'settings' : null,
180
- buffers ? 'buffers' : null,
181
- wal ? 'wal' : null,
182
- ]
183
- .filter(Boolean)
184
- .join('|');
185
- // An Accept header can carry multiple media types but postgrest-js always sends one
186
- const forMediatype = (_a = this.headers.get('Accept')) !== null && _a !== void 0 ? _a : 'application/json';
187
- this.headers.set('Accept', `application/vnd.pgrst.plan+${format}; for="${forMediatype}"; options=${options};`);
188
- if (format === 'json') {
189
- return this;
190
- }
191
- else {
192
- return this;
193
- }
194
- }
195
- /**
196
- * Rollback the query.
197
- *
198
- * `data` will still be returned, but the query is not committed.
199
- */
200
- rollback() {
201
- this.headers.append('Prefer', 'tx=rollback');
202
- return this;
203
- }
204
- /**
205
- * Override the type of the returned `data`.
206
- *
207
- * @typeParam NewResult - The new result type to override with
208
- * @deprecated Use overrideTypes<yourType, { merge: false }>() method at the end of your call chain instead
209
- */
210
- returns() {
211
- return this;
212
- }
213
- /**
214
- * Set the maximum number of rows that can be affected by the query.
215
- * Only available in PostgREST v13+ and only works with PATCH and DELETE methods.
216
- *
217
- * @param value - The maximum number of rows that can be affected
218
- */
219
- maxAffected(value) {
220
- this.headers.append('Prefer', 'handling=strict');
221
- this.headers.append('Prefer', `max-affected=${value}`);
222
- return this;
223
- }
224
- }
225
- exports.default = PostgrestTransformBuilder;
226
- //# sourceMappingURL=PostgrestTransformBuilder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PostgrestTransformBuilder.js","sourceRoot":"","sources":["../../src/PostgrestTransformBuilder.ts"],"names":[],"mappings":";;;;;AAAA,0EAAiD;AAUjD,MAAqB,yBAQnB,SAAQ,0BAAuC;IAC/C;;;;;;;;OAQG;IACH,MAAM,CAIJ,OAAe;QAUf,wCAAwC;QACxC,IAAI,MAAM,GAAG,KAAK,CAAA;QAClB,MAAM,cAAc,GAAG,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,GAAG,CAAC;aACpC,KAAK,CAAC,EAAE,CAAC;aACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACT,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC5B,OAAO,EAAE,CAAA;YACX,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,MAAM,GAAG,CAAC,MAAM,CAAA;YAClB,CAAC;YACD,OAAO,CAAC,CAAA;QACV,CAAC,CAAC;aACD,IAAI,CAAC,EAAE,CAAC,CAAA;QACX,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAA;Q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OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAA;QAC5C,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;OAKG;IACH,OAAO;QASL,OAAO,IAQN,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,KAAa;QAMvB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAA;QAChD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,gBAAgB,KAAK,EAAE,CAAC,CAAA;QACtD,OAAO,IAIqE,CAAA;IAC9E,CAAC;CACF;AArWD,4CAqWC"}
@@ -1,4 +0,0 @@
1
- export declare const DEFAULT_HEADERS: {
2
- 'X-Client-Info': string;
3
- };
4
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe;;CAAiD,CAAA"}