sqlite-http-0.4.1 is not a library.
sqlite-http
An HTTP interface for SQLite. Plays very nicely with Litestream for backup / replication.
Install
> sqlite-http
Examples
Basic
Only receieve sqlite-http's logs
SQLITE_HTTP_LOG=off,sqlite_http=trace
Replicate with litestream (existing config assumes a running local MinIO instance)
Restore with litestream (existing config assumes a running local MinIO instance)
Usage
Send this
{
"sql" "INSERT INTO my_table (str_col, bool_col, blob_col, real_col) VALUES (?, ?, ?, ?)",
"args": ["column 1", true, "03", 4]
}
Get this
{
"rows": []
}
Send this
{
"sql" "SELECT * FROM my_table",
"args": []
}
Get this
{
rows: [
["column 1", true, "03", 4]
]
}
Collecting Metadata
Using the --collect-metadata
flag creates a __metadata_query
table that may be useful in debugging and performance monitoring. Its schema is as follows, and it can be queried as any other table.
Column | Type |
---|---|
id | INTEGER |
payload | TEXT |
started_at | TEXT |
finished_at | TEXT |