clean up scenario package
This commit is contained in:
parent
aa67562d5b
commit
04b43a8f8d
10
index.js
10
index.js
@ -167,15 +167,11 @@ server.get('/scenario_package', bodyParser.json(), function (req, res) {
|
||||
jsonb_build_object(
|
||||
'months'
|
||||
,(SELECT jsonb_agg(row_to_json(months)::jsonb) FROM months)
|
||||
)
|
||||
,jsonb_build_object(
|
||||
'base'
|
||||
,'base'
|
||||
,(SELECT jsonb_agg(row_to_json(base)::jsonb) FROM base)
|
||||
)
|
||||
,jsonb_build_object(
|
||||
'totals'
|
||||
,'totals'
|
||||
,(SELECT jsonb_agg(row_to_json(totals)::jsonb) FROM totals)
|
||||
)`
|
||||
) package`
|
||||
console.log(w);
|
||||
Postgres.FirstRow(w, [], res)
|
||||
//res.json("hi")
|
||||
|
@ -1,4 +1,4 @@
|
||||
--\timing
|
||||
\timing
|
||||
--explain (analyze, buffers)
|
||||
WITH base AS (
|
||||
SELECT
|
||||
@ -61,12 +61,8 @@ SELECT
|
||||
jsonb_build_object(
|
||||
'months'
|
||||
,(SELECT jsonb_agg(row_to_json(months)::jsonb) FROM months)
|
||||
)
|
||||
,jsonb_build_object(
|
||||
'base'
|
||||
,'base'
|
||||
,(SELECT jsonb_agg(row_to_json(base)::jsonb) FROM base)
|
||||
)
|
||||
,jsonb_build_object(
|
||||
'totals'
|
||||
,'totals'
|
||||
,(SELECT jsonb_agg(row_to_json(totals)::jsonb) FROM totals)
|
||||
)
|
||||
) package
|
Loading…
Reference in New Issue
Block a user