Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whosonfirst/go-whosonfirst-sqlite-index
Go package for indexing SQLite databases.
https://github.com/whosonfirst/go-whosonfirst-sqlite-index
golang sqlite whosonfirst
Last synced: 1 day ago
JSON representation
Go package for indexing SQLite databases.
- Host: GitHub
- URL: https://github.com/whosonfirst/go-whosonfirst-sqlite-index
- Owner: whosonfirst
- License: bsd-3-clause
- Created: 2019-06-04T18:36:47.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-01T19:51:51.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T12:59:57.438Z (5 months ago)
- Topics: golang, sqlite, whosonfirst
- Language: Go
- Homepage:
- Size: 22.2 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-whosonfirst-sqlite-index
Go package for indexing SQLite databases using table constucts defined in the `aaronland/go-sqlite/v2` package and records defined by the `whosonfirst/go-whosonfirst-iterate/v2` package.
## Documentation
[![Go Reference](https://pkg.go.dev/badge/github.com/whosonfirst/go-whosonfirst-sqlite-index.svg)](https://pkg.go.dev/github.com/whosonfirst/go-whosonfirst-sqlite-index)
## Tools
```
$> make cli
go build -mod vendor -o bin/example cmd/example/main.go
```### example
```
$> ./bin/example -h
Usage of ./bin/example:
-database-uri string
(default "modernc://mem")
-emitter-uri string
A valid whosonfirst/go-whosonfirst-iterate/v2 URI. Valid schemes are: directory://,featurecollection://,file://,filelist://,geojsonl://,null://,repo://. (default "repo://")
-live-hard-die-fast
Enable various performance-related pragmas at the expense of possible (unlikely) database corruption (default true)
-post-index
Enable post indexing callback function
-timings
Display timings during and after indexing
```For example:
```
$> ./bin/example -dsn 'modernc://cwd/test.db' /usr/local/data/sfomuseum-data-architecture/
2021/02/18 11:34:58 time to index paths (1) 403.514656ms$> sqlite3 test.db
SQLite version 3.28.0 2019-04-15 14:49:49
Enter ".help" for usage hints.
sqlite> .tables
examplesqlite> SELECT COUNT(id) FROM example;
12751
```## See also
* https://github.com/aaronland/go-sqlite
* https://github.com/whosonfirst/go-whosonfirst-iterate