diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-29 14:07:32 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-22 12:15:34 -0400 |
| commit | 428fd2cb63d59a89b46cd831716d0d70c1561805 (patch) | |
| tree | 5462991f6e26cc1aa9ce4224e8654a3ebe602351 /gleam/src/ocda/model.gleam | |
| parent | format 2.0: the abstraction as a library, in D and in Gleam (diff) | |
model 2.1: ocn_range, the verses a poem holds
The format now states, for a container, the first and last ocn of
what it holds: .ocn_range in the .ssp, ocn_range_first and
ocn_range_last in the .ocda.db. A poem is the one container, and since
2.1 it carries ocn 0 and comes before its verses.
Both fields in the model, read by both loaders, in both languages, and
written by the dump. A 2.0 database has neither column, so each
loader asks sqlite whether it is there and reads a 2.0 file as having
no ranges, which is what 2.0 meant; checked on a published 2.0
database, D and Gleam giving the same dump.
Over the 36 document-languages written by spine at 2.1, the four
dumps (D and Gleam, .ssp and .ocda.db) are byte identical, 36 of 36.
(assisted by Claude-Code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'gleam/src/ocda/model.gleam')
| -rw-r--r-- | gleam/src/ocda/model.gleam | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gleam/src/ocda/model.gleam b/gleam/src/ocda/model.gleam index 050a97b..48cc76e 100644 --- a/gleam/src/ocda/model.gleam +++ b/gleam/src/ocda/model.gleam @@ -92,6 +92,8 @@ pub type Object { anchor_tags: List(String), parent_ocn: Int, last_descendant_ocn: Int, + ocn_range_first: Int, + ocn_range_last: Int, children: List(Int), ancestors: List(Int), dummy_heading: Bool, @@ -139,6 +141,8 @@ pub fn new_object() -> Object { anchor_tags: [], parent_ocn: 0, last_descendant_ocn: 0, + ocn_range_first: 0, + ocn_range_last: 0, children: [], ancestors: [], dummy_heading: False, |
