aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test-abstraction-db.sh
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-07 09:58:33 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-09-09 17:19:32 -0400
commit307ccd2ff00f0afc68c17b4d886c778736e73d85 (patch)
treed9eb2e6a995e021b346262bdebad9bbd15b7eec3 /test/test-abstraction-db.sh
parentocda db: structural fields (arrays as JSON) (diff)
ocda db: rows for repeatable fields & images inside
Four things in the abstraction are open ended lists that a single row cannot hold, and which the database therefore could not express at all: a paragraph's extracted links, its anchor tags, a heading's lev4 subtoc entries, and the image records. Each now has a table keyed on the object, ordered by seq: object_images, object_links, object_anchors, object_subtoc And the images themselves are carried in the file, in a files table with role, name, bytes, sha256, pixel size and the blob. The point is self-sufficiency: html copies every image into its output tree, epub and odt place them in their zips, and xelatex reads them from disk, so an abstraction without the bytes cannot produce a document, only its text and structure. The table is deliberately generic rather than an images feature, so that the same mechanism can later carry the source .sst or the pod's configuration by adding a row with another role, and so that a reader can ask whether a database carries its images (select count(*) from files where role='image') and fall back to a directory beside it when the answer is zero. Bytes are stored exactly as read and the digest is taken over them. Only images the document references are carried: the sisu manual's media/image holds 10 files and 5 are in its image list, so 5 are stored. (assisted by Claude-Code)
Diffstat (limited to 'test/test-abstraction-db.sh')
0 files changed, 0 insertions, 0 deletions