Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)