Skip to content
This repository was archived by the owner on Dec 13, 2024. It is now read-only.

Commit 907cfff

Browse files
author
thisisaaronland
committed
update to whosonfirst/go-whosonfirst-sqlite-features v0.6.6; add support for 'supersedes' table
1 parent 4d0b7b6 commit 907cfff

File tree

7 files changed

+178
-24
lines changed

7 files changed

+178
-24
lines changed

cmd/wof-sqlite-index-features/main.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ func main() {
5656
properties := flag.Bool("properties", false, "Index the 'properties' table")
5757
search := flag.Bool("search", false, "Index the 'search' table (using SQLite FTS4 full-text indexer)")
5858
spr := flag.Bool("spr", false, "Index the 'spr' table")
59+
supersedes := flag.Bool("supersedes", false, "Index the 'supersedes' table")
60+
5961
live_hard := flag.Bool("live-hard-die-fast", true, "Enable various performance-related pragmas at the expense of possible (unlikely) database corruption")
6062
timings := flag.Bool("timings", false, "Display timings during and after indexing")
6163
optimize := flag.Bool("optimize", true, "Attempt to optimize the database before closing connection")
@@ -146,6 +148,17 @@ func main() {
146148
to_index = append(to_index, gt)
147149
}
148150

151+
if *supersedes || *all {
152+
153+
t, err := tables.NewSupersedesTableWithDatabase(db)
154+
155+
if err != nil {
156+
logger.Fatal("failed to create 'supersedes' table because %s", err)
157+
}
158+
159+
to_index = append(to_index, t)
160+
}
161+
149162
if *rtree || *all {
150163

151164
rtree_opts, err := tables.DefaultRTreeTableOptions()

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ go 1.12
55
require (
66
github.com/aaronland/go-json-query v0.0.2
77
github.com/tidwall/gjson v1.6.7
8-
github.com/whosonfirst/go-reader v0.2.0
8+
github.com/whosonfirst/go-reader v0.2.1
99
github.com/whosonfirst/go-reader-http v0.1.0
1010
github.com/whosonfirst/go-whosonfirst-geojson-v2 v0.14.1
1111
github.com/whosonfirst/go-whosonfirst-index v0.3.4
1212
github.com/whosonfirst/go-whosonfirst-index-csv v0.0.0-20191002171239-c6712fe20972
1313
github.com/whosonfirst/go-whosonfirst-index-sqlite v0.0.3
1414
github.com/whosonfirst/go-whosonfirst-log v0.1.0
1515
github.com/whosonfirst/go-whosonfirst-sqlite v0.1.6
16-
github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.5
16+
github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.6
1717
github.com/whosonfirst/go-whosonfirst-sqlite-index v0.2.0
1818
github.com/whosonfirst/go-whosonfirst-uri v0.2.0
1919
github.com/whosonfirst/warning v0.1.1

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ github.com/whosonfirst/go-reader v0.1.1 h1:0fXoYQR/Yyh3PKk+9Huwoc6dCAt8l1tjg2dES
144144
github.com/whosonfirst/go-reader v0.1.1/go.mod h1:w0AeU+Ojyfmxb7r+rcSYyxpCxrhxlHv+D9EgEwQsqcM=
145145
github.com/whosonfirst/go-reader v0.2.0 h1:Et8rvkh+86msAo4Db4h88m1t2QDSMNr3rLy6RqJzeJc=
146146
github.com/whosonfirst/go-reader v0.2.0/go.mod h1:qUhz3OWefOUX/G1nzCEUzJskDjkF+l9oKPOM3K2fAJI=
147+
github.com/whosonfirst/go-reader v0.2.1 h1:URhO7a2rDZizElGPy7lrWDpV1c4ceInYMGNQPXsQFiM=
148+
github.com/whosonfirst/go-reader v0.2.1/go.mod h1:qUhz3OWefOUX/G1nzCEUzJskDjkF+l9oKPOM3K2fAJI=
147149
github.com/whosonfirst/go-reader-http v0.0.2 h1:uaCFfNu5Hwr5PDicduLAB1g3y6pi6fUcLJHUKlbNdOw=
148150
github.com/whosonfirst/go-reader-http v0.0.2/go.mod h1:u34jMGXs4smJyVHqGudWoTTy8u954gHqlz9cuIr7eBk=
149151
github.com/whosonfirst/go-reader-http v0.1.0 h1:zgrfHAD5y/jWk2xdoJuGeJr6ISxO+E/GqjxQ8R+j8Do=
@@ -267,6 +269,8 @@ github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.4 h1:NbeWWoS9lhVTDNgq
267269
github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.4/go.mod h1:jZXXBBarIOYmkFl/LiKPjE4dQEunUZjV4fGqQImnXYQ=
268270
github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.5 h1:qnAA3ENTXqZDt9gDsbnj7LdRbqFuiQXb0ERmyi8tMHg=
269271
github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.5/go.mod h1:jZXXBBarIOYmkFl/LiKPjE4dQEunUZjV4fGqQImnXYQ=
272+
github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.6 h1:RSvACOQLGRe5qzUl2mZ1imR4unPRwfxtdsnX5NAG3zY=
273+
github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.6/go.mod h1:jZXXBBarIOYmkFl/LiKPjE4dQEunUZjV4fGqQImnXYQ=
270274
github.com/whosonfirst/go-whosonfirst-sqlite-index v0.0.1 h1:/GuAgxIHn5vZwAEDA4XUSWe7rYWZW30I4HLQRTpBeJY=
271275
github.com/whosonfirst/go-whosonfirst-sqlite-index v0.0.1/go.mod h1:5fY1ikCDhe1u0umawonTOICPzv/2CgfFT9hTAen5nsI=
272276
github.com/whosonfirst/go-whosonfirst-sqlite-index v0.1.0 h1:/tljUy2rchRC9XE4FDteNmYZYhYqxWX2uF4c61WlocU=

vendor/github.com/whosonfirst/go-reader/multi.go

Lines changed: 123 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/whosonfirst/go-whosonfirst-sqlite-features/README.md

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/whosonfirst/go-whosonfirst-sqlite-features/tables/supersedes.go

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ github.com/tidwall/pretty
2424
github.com/twpayne/go-geom
2525
github.com/twpayne/go-geom/encoding/geojson
2626
github.com/twpayne/go-geom/encoding/wkt
27-
# github.com/whosonfirst/go-reader v0.2.0
27+
# github.com/whosonfirst/go-reader v0.2.1
2828
github.com/whosonfirst/go-reader
2929
# github.com/whosonfirst/go-reader-http v0.1.0
3030
github.com/whosonfirst/go-reader-http
@@ -72,7 +72,7 @@ github.com/whosonfirst/go-whosonfirst-spr
7272
github.com/whosonfirst/go-whosonfirst-sqlite
7373
github.com/whosonfirst/go-whosonfirst-sqlite/database
7474
github.com/whosonfirst/go-whosonfirst-sqlite/utils
75-
# github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.5
75+
# github.com/whosonfirst/go-whosonfirst-sqlite-features v0.6.6
7676
github.com/whosonfirst/go-whosonfirst-sqlite-features
7777
github.com/whosonfirst/go-whosonfirst-sqlite-features/tables
7878
# github.com/whosonfirst/go-whosonfirst-sqlite-index v0.2.0

0 commit comments

Comments
 (0)