@fachkraftfreund/n8n-nodes-supabase 1.4.2 → 1.4.4
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.
|
@@ -833,7 +833,7 @@ async function handleBatchCount(supabase, itemCount) {
|
|
|
833
833
|
const whereClauses = [];
|
|
834
834
|
const staticFilters = baseFilters.filter(f => f.column !== groupByColumn);
|
|
835
835
|
for (const f of staticFilters) {
|
|
836
|
-
const col = `"${f.column}"`;
|
|
836
|
+
const col = f.column.includes('.') ? f.column.split('.').map(p => `"${p}"`).join('.') : `"${f.column}"`;
|
|
837
837
|
switch (f.operator) {
|
|
838
838
|
case 'eq':
|
|
839
839
|
whereClauses.push(`${col} = '${String(f.value).replace(/'/g, "''")}'`);
|
|
@@ -910,13 +910,16 @@ async function handleBatchCount(supabase, itemCount) {
|
|
|
910
910
|
if (error)
|
|
911
911
|
throw new Error((0, supabaseClient_1.formatSupabaseError)(error));
|
|
912
912
|
if (!Array.isArray(data) || data.length === 0) {
|
|
913
|
-
return [{ json: { table, groupByColumn,
|
|
914
|
-
}
|
|
915
|
-
return
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
913
|
+
return [{ json: { table, groupByColumn, data: [] } }];
|
|
914
|
+
}
|
|
915
|
+
return [{
|
|
916
|
+
json: {
|
|
917
|
+
table,
|
|
918
|
+
groupByColumn,
|
|
919
|
+
data: data.map((row) => ({
|
|
920
|
+
[groupByColumn]: row[groupByColumn],
|
|
921
|
+
count: Number(row.count),
|
|
922
|
+
})),
|
|
923
|
+
},
|
|
924
|
+
}];
|
|
922
925
|
}
|
package/package.json
CHANGED