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

Commit

Permalink
update vendor deps; expose table names as constants
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed Feb 4, 2024
1 parent e50a2f8 commit 3d36202
Show file tree
Hide file tree
Showing 468 changed files with 231,369 additions and 119,699 deletions.
7 changes: 4 additions & 3 deletions cmd/query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"context"
"flag"
"fmt"
"github.com/aaronland/go-sqlite/v2"
"github.com/aaronland/go-sqlite/v2/query"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2/flags"
"log"
"os"
"strings"

"github.com/aaronland/go-sqlite/v2"
"github.com/aaronland/go-sqlite/v2/query"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2/flags"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package flags

import (
"fmt"
"github.com/whosonfirst/go-whosonfirst-flags/existential"
"strconv"
"strings"

"github.com/whosonfirst/go-whosonfirst-flags/existential"
)

// ExistentialFlagsToQueryConditions converts 'flag_label' and 'str_labels' in a SQL query and its query arguments.
Expand Down
28 changes: 15 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,42 @@ module github.com/whosonfirst/go-whosonfirst-sqlite-features/v2
go 1.18

require (
github.com/aaronland/go-sqlite-modernc v0.0.1
github.com/aaronland/go-sqlite-modernc v0.0.3
github.com/aaronland/go-sqlite/v2 v2.2.0
github.com/paulmach/orb v0.7.1
github.com/tidwall/gjson v1.14.4
github.com/whosonfirst/go-whosonfirst-feature v0.0.25
github.com/whosonfirst/go-whosonfirst-flags v0.4.4
github.com/paulmach/orb v0.11.1
github.com/tidwall/gjson v1.17.0
github.com/whosonfirst/go-whosonfirst-feature v0.0.27
github.com/whosonfirst/go-whosonfirst-flags v0.5.1
github.com/whosonfirst/go-whosonfirst-names v0.1.0
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.3.3
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.3.7
)

require (
github.com/aaronland/go-roster v1.0.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/sfomuseum/go-edtf v1.1.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/whosonfirst/go-rfc-5646 v0.1.0 // indirect
github.com/whosonfirst/go-whosonfirst-sources v0.1.0 // indirect
github.com/whosonfirst/go-whosonfirst-uri v1.2.0 // indirect
github.com/whosonfirst/go-whosonfirst-uri v1.3.0 // indirect
go.mongodb.org/mongo-driver v1.11.4 // indirect
golang.org/x/mod v0.3.0 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/tools v0.0.0-20210106214847-113979e3529a // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect
modernc.org/libc v1.21.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.4.0 // indirect
modernc.org/libc v1.29.0 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/sqlite v1.20.0 // indirect
modernc.org/sqlite v1.28.0 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.0.1 // indirect
)
102 changes: 67 additions & 35 deletions go.sum

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions tables/ancestors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ package tables
import (
"context"
"fmt"
"strings"

"github.com/aaronland/go-sqlite/v2"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
"strings"
)

const ANCESTORS_TABLE_NAME string = "ancestors"

type AncestorsTable struct {
features.FeatureTable
name string
Expand Down Expand Up @@ -42,7 +45,7 @@ func NewAncestorsTableWithDatabase(ctx context.Context, db sqlite.Database) (sql
func NewAncestorsTable(ctx context.Context) (sqlite.Table, error) {

t := AncestorsTable{
name: "ancestors",
name: ANCESTORS_TABLE_NAME,
}

return &t, nil
Expand Down
5 changes: 4 additions & 1 deletion tables/concordances.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ package tables
import (
"context"
"fmt"

"github.com/aaronland/go-sqlite/v2"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
)

const CONCORDANCES_TABLE_NAME string = "concordances"

type ConcordancesTable struct {
features.FeatureTable
name string
Expand Down Expand Up @@ -41,7 +44,7 @@ func NewConcordancesTableWithDatabase(ctx context.Context, db sqlite.Database) (
func NewConcordancesTable(ctx context.Context) (sqlite.Table, error) {

t := ConcordancesTable{
name: "concordances",
name: CONCORDANCES_TABLE_NAME,
}

return &t, nil
Expand Down
1 change: 1 addition & 0 deletions tables/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tables

import (
"fmt"

"github.com/aaronland/go-sqlite/v2"
)

Expand Down
5 changes: 4 additions & 1 deletion tables/geojson.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ package tables
import (
"context"
"fmt"

"github.com/aaronland/go-sqlite/v2"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
)

const GEOJSON_TABLE_NAME string = "geojson"

type GeoJSONTableOptions struct {
IndexAltFiles bool
AllowMissingSourceGeom bool
Expand Down Expand Up @@ -78,7 +81,7 @@ func NewGeoJSONTable(ctx context.Context) (sqlite.Table, error) {
func NewGeoJSONTableWithOptions(ctx context.Context, opts *GeoJSONTableOptions) (sqlite.Table, error) {

t := GeoJSONTable{
name: "geojson",
name: GEOJSON_TABLE_NAME,
options: opts,
}

Expand Down
7 changes: 5 additions & 2 deletions tables/geometries.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ package tables
import (
"context"
"fmt"
_ "log"

"github.com/aaronland/go-sqlite/v2"
"github.com/paulmach/orb/encoding/wkt"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/geometry"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
_ "log"
)

const GEOMETRIES_TABLE_NAME string = "geometries"

type GeometriesTableOptions struct {
IndexAltFiles bool
}
Expand Down Expand Up @@ -51,7 +54,7 @@ func NewGeometriesTable(ctx context.Context) (sqlite.Table, error) {
func NewGeometriesTableWithOptions(ctx context.Context, opts *GeometriesTableOptions) (sqlite.Table, error) {

t := GeometriesTable{
name: "geometries",
name: GEOMETRIES_TABLE_NAME,
options: opts,
}

Expand Down
4 changes: 3 additions & 1 deletion tables/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
)

const NAMES_TABLE_NAME string = "names"

type NamesTable struct {
features.FeatureTable
name string
Expand Down Expand Up @@ -50,7 +52,7 @@ func NewNamesTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite.
func NewNamesTable(ctx context.Context) (sqlite.Table, error) {

t := NamesTable{
name: "names",
name: NAMES_TABLE_NAME,
}

return &t, nil
Expand Down
5 changes: 4 additions & 1 deletion tables/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ package tables
import (
"context"
"fmt"

"github.com/aaronland/go-sqlite/v2"
"github.com/tidwall/gjson"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
)

const PROPERTIES_TABLE_NAME string = "properties"

type PropertiesTableOptions struct {
IndexAltFiles bool
}
Expand Down Expand Up @@ -77,7 +80,7 @@ func NewPropertiesTable(ctx context.Context) (sqlite.Table, error) {
func NewPropertiesTableWithOptions(ctx context.Context, opts *PropertiesTableOptions) (sqlite.Table, error) {

t := PropertiesTable{
name: "properties",
name: PROPERTIES_TABLE_NAME,
options: opts,
}

Expand Down
6 changes: 4 additions & 2 deletions tables/rtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ package tables
import (
"context"
"fmt"

"github.com/aaronland/go-sqlite/v2"
"github.com/paulmach/orb"
"github.com/paulmach/orb/encoding/wkt"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/geometry"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
_ "log"
)

const RTREE_TABLE_NAME string = "rtree"

type RTreeTableOptions struct {
IndexAltFiles bool
}
Expand Down Expand Up @@ -48,7 +50,7 @@ func NewRTreeTable(ctx context.Context) (sqlite.Table, error) {
func NewRTreeTableWithOptions(ctx context.Context, opts *RTreeTableOptions) (sqlite.Table, error) {

t := RTreeTable{
name: "rtree",
name: RTREE_TABLE_NAME,
options: opts,
}

Expand Down
9 changes: 6 additions & 3 deletions tables/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ package tables
import (
"context"
"fmt"
_ "log"
"strings"

"github.com/aaronland/go-sqlite/v2"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-names/tags"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
_ "log"
"strings"
)

const SEARCH_TABLE_NAME string = "search"

type SearchTable struct {
features.FeatureTable
name string
Expand All @@ -37,7 +40,7 @@ func NewSearchTableWithDatabase(ctx context.Context, db sqlite.Database) (sqlite
func NewSearchTable(ctx context.Context) (sqlite.Table, error) {

t := SearchTable{
name: "search",
name: SEARCH_TABLE_NAME,
}

return &t, nil
Expand Down
11 changes: 7 additions & 4 deletions tables/spr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ package tables
import (
"context"
"fmt"
_ "log"
"strconv"
"strings"

"github.com/aaronland/go-sqlite/v2"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-spr/v2"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
_ "log"
"strconv"
"strings"
)

const SPR_TABLE_NAME string = "spr"

type SPRTableOptions struct {
IndexAltFiles bool
}
Expand Down Expand Up @@ -46,7 +49,7 @@ func NewSPRTable(ctx context.Context) (sqlite.Table, error) {
func NewSPRTableWithOptions(ctx context.Context, opts *SPRTableOptions) (sqlite.Table, error) {

t := SPRTable{
name: "spr",
name: SPR_TABLE_NAME,
options: opts,
}

Expand Down
5 changes: 4 additions & 1 deletion tables/supersedes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ package tables
import (
"context"
"fmt"

"github.com/aaronland/go-sqlite/v2"
"github.com/whosonfirst/go-whosonfirst-feature/alt"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-sqlite-features/v2"
)

const SUPERSEDES_TABLE_NAME string = "supersedes"

type SupersedesTable struct {
features.FeatureTable
name string
Expand All @@ -34,7 +37,7 @@ func NewSupersedesTableWithDatabase(ctx context.Context, db sqlite.Database) (sq
func NewSupersedesTable(ctx context.Context) (sqlite.Table, error) {

t := SupersedesTable{
name: "supersedes",
name: SUPERSEDES_TABLE_NAME,
}

return &t, nil
Expand Down
Loading

0 comments on commit 3d36202

Please sign in to comment.