Skip to content

Commit 000a2ca

Browse files
committed
MOD/NFC: renamed function that had 'etcs' in the name
1 parent 3199ea0 commit 000a2ca

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

signals.mml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ Layer:
112112
tags->'railway:kvb' AS kvb,
113113
tags->'railway:tvm' AS tvm,
114114
tags->'railway:scmt' AS scmt,
115-
railway_etcs_null_no(tags->'railway:ptc') AS ptc,
116-
railway_etcs_null_no(tags->'railway:etcs') AS etcs,
117-
railway_etcs_null_no(tags->'construction:railway:etcs') AS construction_etcs
115+
railway_null_or_zero_to_no(tags->'railway:ptc') AS ptc,
116+
railway_null_or_zero_to_no(tags->'railway:etcs') AS etcs,
117+
railway_null_or_zero_to_no(tags->'construction:railway:etcs') AS construction_etcs
118118
FROM openrailwaymap_osm_line
119119
WHERE railway = 'rail' AND usage IN ('main', 'branch') AND service IS NULL
120120
) AS r
@@ -153,9 +153,9 @@ Layer:
153153
tags->'railway:kvb' AS kvb,
154154
tags->'railway:tvm' AS tvm,
155155
tags->'railway:scmt' AS scmt,
156-
railway_etcs_null_no(tags->'railway:ptc') AS ptc,
157-
railway_etcs_null_no(tags->'railway:etcs') AS etcs,
158-
railway_etcs_null_no(tags->'construction:railway:etcs') AS construction_etcs
156+
railway_null_or_zero_to_no(tags->'railway:ptc') AS ptc,
157+
railway_null_or_zero_to_no(tags->'railway:etcs') AS etcs,
158+
railway_null_or_zero_to_no(tags->'construction:railway:etcs') AS construction_etcs
159159
FROM openrailwaymap_osm_line
160160
WHERE railway = 'rail' AND usage = 'main' AND service IS NULL
161161
) AS r
@@ -201,9 +201,9 @@ Layer:
201201
tags->'railway:kvb' AS kvb,
202202
tags->'railway:tvm' AS tvm,
203203
tags->'railway:scmt' AS scmt,
204-
railway_etcs_null_no(tags->'railway:ptc') AS ptc,
205-
railway_etcs_null_no(tags->'railway:etcs') AS etcs,
206-
railway_etcs_null_no(tags->'construction:railway:etcs') AS construction_etcs,
204+
railway_null_or_zero_to_no(tags->'railway:ptc') AS ptc,
205+
railway_null_or_zero_to_no(tags->'railway:etcs') AS etcs,
206+
railway_null_or_zero_to_no(tags->'construction:railway:etcs') AS construction_etcs,
207207
layer
208208
FROM openrailwaymap_osm_line
209209
WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'disused', 'construction', 'preserved')

sql/functions.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ $$ LANGUAGE plpgsql;
295295

296296

297297
-- Set a value to 'no' if it is null or 0.
298-
CREATE OR REPLACE FUNCTION railway_etcs_null_no(field TEXT) RETURNS
298+
CREATE OR REPLACE FUNCTION railway_null_or_zero_to_no(field TEXT) RETURNS
299299
TEXT AS $$
300300
BEGIN
301301
IF field = '0' THEN

0 commit comments

Comments
 (0)