Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fklc/sqlite-to-json
Query SQLite databases with prebuilt binaries
https://github.com/fklc/sqlite-to-json
json sqlite sqlite3
Last synced: 6 days ago
JSON representation
Query SQLite databases with prebuilt binaries
- Host: GitHub
- URL: https://github.com/fklc/sqlite-to-json
- Owner: FKLC
- License: mit
- Created: 2023-03-26T02:31:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-26T06:20:34.000Z (over 1 year ago)
- Last Synced: 2024-06-21T08:22:49.272Z (5 months ago)
- Topics: json, sqlite, sqlite3
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SQLite to JSON
This program allows you to run queries on a SQLite database and output each row as JSON. This is a very basic program, could be modified for other purposes.### Usage
```console
./stj mydatabase.db "SELECT * FROM mytable" > outputfile
```### Goal
The goal of this program is to be as simple as possible. It also uses no CGO SQLite to enable cross compilation. See [supported platforms](https://pkg.go.dev/modernc.org/sqlite#hdr-Supported_platforms_and_architectures). **This isn't a replacement for sqlite3**.#### Sources
I used/plagiarized parts of [@SchumacherFM's code](https://gist.github.com/SchumacherFM/69a167bec7dea644a20e)