aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-08 08:28:24 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-09-09 17:56:14 -0400
commit9af1dda9b03f745aa2b7700419574e2e3e59fde2 (patch)
tree62ebe97f85a6bac96aeede065c9137c087296c84 /org/spine.org
parenta reader for the ocda db, and its round trip (diff)
ocda db: built from the .ssp, (tethered)
The ocda database is now built from the .ssp itself: the writer's lines are emitted, read straight back by ssp_in, and the objects that come out populate the database. Anything the .ssp does not carry, the database will not have either, by construction (rather than by test). [instead of as previously through a second walk over the in-memory abstraction] - spineAbstractionTxt is split: sspDocumentLines(doc) returns the whole .ssp as lines, and the file writer emits them. Output neutral, the reference test confirms. - spineAbstractionDb takes the abstraction as an argument rather than taking doc.abstraction. - sspRoundTripAbstraction(doc) in ssp_in is the join: lines out, lines in, abstraction returned. Both call sites in spine.d use it. - the header blocks and the image blobs still come from doc_matters (as: the .ssp does not carry image bytes). All (35) markup sample sourced databases built through the .ssp have byte identical SQL dumps to the one built directly before the change. That comparison also found one reader inaccuracy, which the .ssp round trip could not see because the writer omits the field either way: an absent identifier was restored as the ocn in every case, but for an object with no ocn it was empty ("a"~N identifiers are always written). Fixed; the two artefacts checking each other is what caught it. (assisted by Claude-Code)
Diffstat (limited to 'org/spine.org')
-rw-r--r--org/spine.org10
1 files changed, 8 insertions, 2 deletions
diff --git a/org/spine.org b/org/spine.org
index 722f235..84e4d04 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -1719,10 +1719,16 @@ if (doc.matters.opt.action.show_abstraction) {
#+NAME: spine_each_file_show_abstraction_db
#+BEGIN_SRC d
-/+ ↓ document abstraction sqlite database +/
+/+ ↓ document abstraction sqlite database, built from the .ssp: the
+ lines are emitted and read straight back, and the objects that
+ come out are what is written, so the database cannot carry
+ anything the .ssp does not
++/
if (doc.matters.opt.action.show_abstraction_db) {
+ import sisudoc.ocda.abstraction.ssp_in;
import sisudoc.outputs.io_out.create_abstraction_db;
- spineAbstractionDb!()(doc);
+ mixin spineAbstractionRead;
+ spineAbstractionDb!()(doc, sspRoundTripAbstraction(doc));
}
#+END_SRC