comparison flys-aft/src/main/resources/sql/flys-common.properties @ 5257:46e984a3d576

Break long lines in FLYS statements.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 11 Mar 2013 12:55:09 +0100
parents d9f1202cef78
children da1e897c7224
comparison
equal deleted inserted replaced
5215:c8e79cff622a 5257:46e984a3d576
4 JOIN wsts w ON r.id = w.river_id \ 4 JOIN wsts w ON r.id = w.river_id \
5 JOIN wst_columns wc ON w.id = wc.wst_id \ 5 JOIN wst_columns wc ON w.id = wc.wst_id \
6 JOIN wst_column_values wcv ON wcv.wst_column_id = wc.id \ 6 JOIN wst_column_values wcv ON wcv.wst_column_id = wc.id \
7 WHERE w.kind = 0 \ 7 WHERE w.kind = 0 \
8 GROUP BY r.id, r.name 8 GROUP BY r.id, r.name
9 select.gauges = SELECT id, name, official_number FROM gauges WHERE river_id = :river_id 9 select.gauges = \
10 next.gauge.id = SELECT NEXTVAL('GAUGES_ID_SEQ') AS gauge_id 10 SELECT id, name, official_number \
11 insert.gauge = INSERT INTO gauges (id, name, river_id, station, aeo, official_number, datum) \ 11 FROM gauges \
12 VALUES(:id, :name, :river_id, :station, :aeo, :official_number, :datum) 12 WHERE river_id = :river_id
13 select.timeintervals = SELECT id, start_time, stop_time FROM time_intervals 13 next.gauge.id = \
14 next.timeinterval.id = SELECT NEXTVAL('TIME_INTERVALS_ID_SEQ') AS time_interval_id 14 SELECT NEXTVAL('GAUGES_ID_SEQ') AS gauge_id
15 insert.timeinterval = INSERT INTO time_intervals (id, start_time, stop_time) VALUES (:id, :start_time, :stop_time) 15 insert.gauge = \
16 next.discharge.id = SELECT NEXTVAL('DISCHARGE_TABLES_ID_SEQ') AS discharge_table_id 16 INSERT INTO gauges (id, name, river_id, station, aeo, official_number, datum) \
17 VALUES(:id, :name, :river_id, :station, :aeo, :official_number, :datum)
18 select.timeintervals = \
19 SELECT id, start_time, stop_time FROM time_intervals
20 next.timeinterval.id = \
21 SELECT NEXTVAL('TIME_INTERVALS_ID_SEQ') AS time_interval_id
22 insert.timeinterval = \
23 INSERT INTO time_intervals (id, start_time, stop_time) \
24 VALUES (:id, :start_time, :stop_time)
25 next.discharge.id = \
26 SELECT NEXTVAL('DISCHARGE_TABLES_ID_SEQ') AS discharge_table_id
17 insert.dischargetable = \ 27 insert.dischargetable = \
18 INSERT INTO discharge_tables \ 28 INSERT INTO discharge_tables \
19 (id, gauge_id, description, bfg_id, kind, time_interval_id) \ 29 (id, gauge_id, description, bfg_id, kind, time_interval_id) \
20 VALUES (:id, :gauge_id, :description, :bfg_id, 1, :time_interval_id) 30 VALUES (:id, :gauge_id, :description, :bfg_id, 1, :time_interval_id)
21 select.discharge.table.values = SELECT id, w, q FROM discharge_table_values WHERE table_id = :table_id 31 select.discharge.table.values = \
22 next.discharge.table.values.id = SELECT NEXTVAL('DISCHARGE_TABLE_VALUES_ID_SEQ') AS discharge_table_values_id 32 SELECT id, w, q FROM discharge_table_values WHERE table_id = :table_id
23 insert.discharge.table.value = INSERT INTO discharge_table_values (id, table_id, w, q) VALUES (:id, :table_id, :w, :q) 33 next.discharge.table.values.id = \
24 delete.discharge.table.value = DELETE FROM discharge_table_values WHERE id = :id 34 SELECT NEXTVAL('DISCHARGE_TABLE_VALUES_ID_SEQ') AS discharge_table_values_id
35 insert.discharge.table.value = \
36 INSERT INTO discharge_table_values (id, table_id, w, q) \
37 VALUES (:id, :table_id, :w, :q)
38 delete.discharge.table.value = \
39 DELETE FROM discharge_table_values WHERE id = :id
25 select.gauge.discharge.tables = \ 40 select.gauge.discharge.tables = \
26 SELECT \ 41 SELECT \
27 dt.id AS id, \ 42 dt.id AS id, \
28 dt.description AS description, \ 43 dt.description AS description, \
29 ti.start_time AS start_time, \ 44 ti.start_time AS start_time, \
30 ti.stop_time AS stop_time, \ 45 ti.stop_time AS stop_time, \
31 dt.bfg_id AS bfg_id \ 46 dt.bfg_id AS bfg_id \
32 FROM discharge_tables dt \ 47 FROM discharge_tables dt \
33 LEFT OUTER JOIN time_intervals ti ON dt.time_interval_id = ti.id \ 48 LEFT OUTER JOIN time_intervals ti ON dt.time_interval_id = ti.id \
34 WHERE gauge_id = :gauge_id 49 WHERE gauge_id = :gauge_id

http://dive4elements.wald.intevation.org