1
0
Fork 0
mirror of synced 2024-07-07 23:35:49 +12:00
budibase/packages/builder/cypress/support/queryLevelTransformerFunction.js
Mitch-Budibase 9a7286568a Structural Changes + New Test
Structural changes surrounding data sources
-Cypress env file removed
-Text change for fetching tables
-Oracle tests organised
-PostgreSQL tests organised

New test is for skipping table fetch via button

There are a few other smaller changes
2022-01-18 16:02:42 +00:00

14 lines
293 B
JavaScript

const breweries = data
const totals = {}
for (let brewery of breweries)
{const state = brewery.state
if (totals[state] == null)
{totals[state] = 1
} else
{totals[state]++
}
}
const entries = Object.entries(totals)
return entries.map(([state, count]) => ({ state, count }))