@fachkraftfreund/n8n-nodes-supabase 1.3.12 → 1.3.13
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.
|
@@ -250,6 +250,8 @@ async function handleBulkUpsert(supabase, itemCount) {
|
|
|
250
250
|
async function handleBulkUpdate(supabase, itemCount) {
|
|
251
251
|
const table = this.getNodeParameter('table', 0);
|
|
252
252
|
const matchColumn = this.getNodeParameter('matchColumn', 0);
|
|
253
|
+
const returnFields = this.getNodeParameter('returnFields', 0, '*');
|
|
254
|
+
const selectFields = returnFields && returnFields !== '*' ? returnFields : '*';
|
|
253
255
|
(0, supabaseClient_1.validateTableName)(table);
|
|
254
256
|
if (!matchColumn) {
|
|
255
257
|
throw new Error('Match Column is required for update operations');
|
|
@@ -275,7 +277,7 @@ async function handleBulkUpdate(supabase, itemCount) {
|
|
|
275
277
|
const { data, error } = await supabase
|
|
276
278
|
.from(table)
|
|
277
279
|
.upsert(batch, { onConflict: matchColumn })
|
|
278
|
-
.select();
|
|
280
|
+
.select(selectFields);
|
|
279
281
|
if (error)
|
|
280
282
|
throw new Error((0, supabaseClient_1.formatSupabaseError)(error));
|
|
281
283
|
return data;
|
|
@@ -720,6 +722,8 @@ async function handleFindOrCreate(supabase, itemIndex) {
|
|
|
720
722
|
}
|
|
721
723
|
async function handleUpdateByQuery(supabase, itemIndex, hostUrl) {
|
|
722
724
|
const table = this.getNodeParameter('table', itemIndex);
|
|
725
|
+
const returnFields = this.getNodeParameter('returnFields', itemIndex, '*');
|
|
726
|
+
const selectFields = returnFields && returnFields !== '*' ? returnFields : '*';
|
|
723
727
|
(0, supabaseClient_1.validateTableName)(table);
|
|
724
728
|
const uiMode = this.getNodeParameter('uiMode', itemIndex, 'simple');
|
|
725
729
|
let updateData;
|
|
@@ -760,7 +764,7 @@ async function handleUpdateByQuery(supabase, itemIndex, hostUrl) {
|
|
|
760
764
|
const operator = (0, supabaseClient_1.convertFilterOperator)(filter.operator);
|
|
761
765
|
query = query.filter(filter.column, operator, (0, supabaseClient_1.normalizeFilterValue)(filter.operator, filter.value));
|
|
762
766
|
}
|
|
763
|
-
const { data, error } = await query.select();
|
|
767
|
+
const { data, error } = await query.select(selectFields);
|
|
764
768
|
if (error)
|
|
765
769
|
throw new Error((0, supabaseClient_1.formatSupabaseError)(error));
|
|
766
770
|
return data;
|
package/package.json
CHANGED