mq-db
A Markdown-specialized embedded database, in Rust

Your Markdown is
already a database.

Interval-indexed block storage for Markdown — query it with SQL or mq, persist it to a compact page-file format. No SQLite dependency.

sql> everything nested under a heading
under()
-- all text/code nested under the "Architecture" heading
SELECT b.block_type, b.content FROM blocks b
WHERE under(b.pre, b.post,
  (SELECT pre  FROM blocks WHERE block_type = 'heading' AND content = 'Architecture'),
  (SELECT post FROM blocks WHERE block_type = 'heading' AND content = 'Architecture'))
ORDER BY b.pre;