Skip to content

Instantly share code, notes, and snippets.

@akehrer
akehrer / sqlite_to_json.sql
Created January 9, 2018 19:58
SQLite Results as JSON using the SQLite JSON1 extension
-- When SQLite is compiled with the JSON1 extensions it provides builtin tools
-- for manipulating JSON data stored in the database.
-- This is a gist showing SQLite return query data as a JSON object.
-- https://www.sqlite.org/json1.html
-- An example table with some data
CREATE TABLE users (
id INTEGER PRIMARY KEY NOT NULL,
full_name TEXT NOT NULL,
email TEXT NOT NULL,

Keybase proof

I hereby claim:

  • I am akehrer on github.
  • I am akehrer (https://keybase.io/akehrer) on keybase.
  • I have a public key whose fingerprint is EF67 940A 26C4 DB94 F87C A243 B891 479A A8CE C15D

To claim this, I am signing this object: