summaryrefslogtreecommitdiffhomepage
path: root/gleam/src/ocda/load_db.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'gleam/src/ocda/load_db.gleam')
-rw-r--r--gleam/src/ocda/load_db.gleam7
1 files changed, 6 insertions, 1 deletions
diff --git a/gleam/src/ocda/load_db.gleam b/gleam/src/ocda/load_db.gleam
index e919615..a5f044b 100644
--- a/gleam/src/ocda/load_db.gleam
+++ b/gleam/src/ocda/load_db.gleam
@@ -243,6 +243,8 @@ fn objects(
use text <- decode.field(35, decode.string)
use id <- decode.field(36, decode.int)
use hla <- decode.field(37, decode.string)
+ use seg_epub <- decode.field(38, decode.string)
+ use seg_epub_is <- decode.field(39, decode.string)
decode.success(#(
id,
Object(
@@ -280,6 +282,8 @@ fn objects(
segment_next: segment_next,
anchor: anchor,
heading_lev_anchor: hla,
+ segment_epub: seg_epub,
+ segment_epub_is: seg_epub_is,
table_cols: table_cols,
table_widths: json_words(table_widths),
table_header: table_header != 0,
@@ -345,7 +349,8 @@ fn object_sql(doc_id: Int) -> String {
coalesce(table_aligns,''), coalesce(table_header,0),
coalesce(code_linenumbers,0),
coalesce(heading_ancestors_text,''), coalesce(sha256,''),
- coalesce(text,''), id, coalesce(heading_lev_anchor,'')
+ coalesce(text,''), id, coalesce(heading_lev_anchor,''),
+ coalesce(segment_epub,''), coalesce(segment_epub_is,'')
from objects where doc_id = " <> int.to_string(doc_id) <> "
order by case section
when 'head' then 1 when 'toc' then 2 when 'body' then 3