| SQLite as a Document Database (2020)(dgl.cx) | |
| 252 points by lioeters 16 days ago | 56 comments | |
tl;dr: SQLite 3.31.0 (Jan 2020) added generated columns, which combined with existing JSON support effectively turns it into a document database. You can insert raw JSON into a TEXT column and define VIRTUAL or STORED columns that extract fields via `json_extract`, which can then be indexed and constrained (NOT NULL, etc.) like normal columns. This enables a workflow where you dump JSON payloads (e.g. webhooks) into a table and progressively add extracted columns and indexes via ALTER TABLE as needed. | |
HN Discussion:
| |