@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.
@@ -542,7 +542,7 @@ class Supabase {
542
542
  displayOptions: {
543
543
  show: {
544
544
  resource: ['database'],
545
- operation: ['read'],
545
+ operation: ['read', 'update', 'updateByQuery'],
546
546
  },
547
547
  },
548
548
  },
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fachkraftfreund/n8n-nodes-supabase",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "Comprehensive n8n community node for Supabase with database and storage operations",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",