Skip to content

Commit

Permalink
chore(fct_setarcfusion): add example queries to run individually or m…
Browse files Browse the repository at this point in the history
…assively
  • Loading branch information
albertbofill committed Sep 5, 2024
1 parent 30a95aa commit 26ec5ac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions utils/fct/gw_fct_setarcfusion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ RETURNS json AS
$BODY$

/*
DELETE FROM SCHEMA_NAME.inp_flwreg_weir where to_arc = '242'
SELECT SCHEMA_NAME.gw_fct_setarcfusion('{"client":{"device":4, "infoType":1, "lang":"ES"},"feature":{"id":[250]},
"data":{"workcatId":"work1","enddate":"2020-02-05", "state_type":2, "state":1, "psectorId":null, "arccat_id":"RC200", "arc_type":"CONDUIT"}}'::json)
-- MODE 1: individual
SELECT SCHEMA_NAME.gw_fct_setarcfusion($${"client":{"device":4, "lang":"es_ES", "infoType":1, "epsg":7800}, "form":{}, "feature":{"id":["3470"]}, "data":{"filterFields":{}, "pageInfo":{}, "enddate":"2024-09-05", "action_mode": 2}}$$);
-- MODE 2: massive usign pure SQL
SELECT SCHEMA_NAME.gw_fct_setarcfusion(concat('
{"client":{"device":4, "lang":"es_ES", "infoType":1, "epsg":7800}, "form":{},
"feature":{"id":["',node_id,'"]}, "data":{"filterFields":{}, "pageInfo":{}, "enddate":"2024-09-05", "action_mode": 2}}')::json) FROM ... WHERE...;
-- fid: 214
Expand Down

0 comments on commit 26ec5ac

Please sign in to comment.