btree/

directory
v2.0.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT

README

btree docs

Documentation for the embedded btree/pager/wal engine in internal/btree/ — a Go port of SQLite's storage layer (btree.c, pager.c, wal.c, pcache.c, pcache1.c, plus selected SHM helpers).

Start here

  • NOTES.md — comprehensive drift catalog vs upstream SQLite. Section markers (e.g. "§20, drift 3") are the citation form used in source comments.
  • UPSTREAM.md — last-verified SQLite + SQLCipher upstream versions; bump when re-syncing.

Subdirectories

  • mappings/ — function-level coverage matrix (Go ↔ SQLite C). Authoritative inputs: go_to_sqlite.json, sqlite_skip.json. Generated *.gen.json files are gitignored. See mappings/README.md for the regen workflow.
  • specs/integrity.md — page-integrity (cksumvfs) codec design.

Implementation plans and the remaining design docs live in the tests repo under any-store-tests:docs/any-store/btree/{plans,specs}.

Conventions

Plan filenames are date-prefixed (YYYY-MM-DD-name.md); spec filenames are topic-named. Source comments cite docs as docs/btree/NOTES.md §N or any-store-tests:docs/any-store/btree/plans/<file>.md Task N so a reader can grep from either side.

Directories

Path Synopsis
mappings
scripts/build_mappings command
Rebuilds the derived mapping artifacts from go_to_sqlite.json.
Rebuilds the derived mapping artifacts from go_to_sqlite.json.
scripts/extract_codec_blocks command
Extracts every SQLCipher codec hook block from ../sqlcipher/src and writes docs/btree/mappings/sqlcipher_codec_blocks.gen.json so mappings_diff can surface any block that has no corresponding row in the hand-edited sqlcipher_codec.json.
Extracts every SQLCipher codec hook block from ../sqlcipher/src and writes docs/btree/mappings/sqlcipher_codec_blocks.gen.json so mappings_diff can surface any block that has no corresponding row in the hand-edited sqlcipher_codec.json.
scripts/extract_funcs command
Extracts function lists from two sources and writes them to JSON files:
Extracts function lists from two sources and writes them to JSON files:
scripts/mappings_diff command
Reports drift between the freshly-extracted allowlists (*.gen.json) and the hand-edited mapping inputs (go_to_sqlite.json, sqlite_skip.json, sqlcipher_codec.json).
Reports drift between the freshly-extracted allowlists (*.gen.json) and the hand-edited mapping inputs (go_to_sqlite.json, sqlite_skip.json, sqlcipher_codec.json).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL