geocode_records 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +6 -0
- data/lib/geocode_records/update_table_from_csv.rb +2 -2
- data/lib/geocode_records/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a895a090a8b5d022953b811691a6e8b4caec813b
|
4
|
+
data.tar.gz: a29e9e2f6a3d926edcdd0c3152fe9d257cdb371f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d88e8e7121c28fa5f81cb32037f1f596411c7c4d40762d8f44c92f6a442cd57fb6bbaf941d29aaf229cb7d7ee39d6ddd819ee3d075db67dc7077c214bdb50a
|
7
|
+
data.tar.gz: '093ccaa9d2279430a359f080f66f4675583c7c649af6ac60432628bc9b8b210fc436ea4c58ded0cafe1288e86506e3708cc73a45972b3a009b146fd21b1d33b9'
|
data/CHANGELOG
CHANGED
@@ -38,9 +38,9 @@ class GeocodeRecords
|
|
38
38
|
WHEN src.ss_primary_number IS NULL THEN NULL
|
39
39
|
WHEN LENGTH(src.ss_primary_number) > 8 THEN NULL
|
40
40
|
WHEN src.ss_primary_number ~ '\\A\\d+\\Z' THEN src.ss_primary_number::int
|
41
|
-
WHEN src.ss_primary_number ~ '/' THEN (regexp_matches(src.ss_primary_number, '(\\d+)'))[1]::int
|
41
|
+
WHEN src.ss_primary_number ~ '/' THEN (SELECT regexp_matches(src.ss_primary_number, '(\\d+)'))[1]::int
|
42
42
|
WHEN src.ss_primary_number ~ '-' THEN (SELECT ROUND(AVG(v)) FROM unnest(array_remove(regexp_split_to_array(src.ss_primary_number, '\\D+'), '')::int[]) v)
|
43
|
-
ELSE (regexp_matches(src.ss_primary_number, '(\\d+)'))[1]::int
|
43
|
+
ELSE (SELECT regexp_matches(src.ss_primary_number, '(\\d+)'))[1]::int
|
44
44
|
END,
|
45
45
|
unit_number = src.ss_secondary_number,
|
46
46
|
city = COALESCE(src.ss_default_city_name, src.ss_city_name),
|