aboutsummaryrefslogtreecommitdiffstats
path: root/core/module-list.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-05 17:38:03 +0100
committereunhhu <[email protected]>2026-10-05 17:38:03 +0100
commitb81d8bc8249ee35e87ea630413a311460e85eec0 (patch)
treeed13ff46346e7bf25e695e73ed927358bdc6fb30 /core/module-list.h
parentf7d369e77d999a0e60f3de2b5511b99c81b266bb (diff)
downloadpure-b81d8bc8249ee35e87ea630413a311460e85eec0.tar.gz
pure-b81d8bc8249ee35e87ea630413a311460e85eec0.zip
Text keys (023): a list knows the text field it is keyed by; an event's list keyed by a text is HASHED from its first item, its table's slots holding the texts' hashes (FNV-1a), a match the key cell's bytes too; HAS and a field by key read the table; its order made by a merge sort (the first eight bytes as a number, then all). A FIND whose index only an ITEM_SET of its list takes, the code between in a line finding by key alone, sets the item where it was found (PLAN_ROW: a HASHED list's slot, no position made). words 453 to 217 ms (5.8x C)
text_keys_equivalence: adds, has, fields by key, sets where found, positions, runs, removes and clears against a tree keyed by the text
Diffstat (limited to 'core/module-list.h')
-rw-r--r--core/module-list.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/module-list.h b/core/module-list.h
index 3ae468f..369e8ed 100644
--- a/core/module-list.h
+++ b/core/module-list.h
@@ -159,6 +159,12 @@ bool pure_list_suits(PureList *, unsigned needs, unsigned narrow);
bool pure_list_full(PureList *);
/* Whether key is there, by the set: false when the list keeps none (search it then). */
bool pure_list_contains(const PureList *, double key, bool *found);
+/* Whether a HASHED list keyed by a text has key (false: it is not one; search it). */
+bool pure_list_contains_text(const PureList *list, PureCell key, bool *found);
+/* Where key is, for a set of the item found (pure_list_set_row): a HASHED
+ * list's slot (no position made), else its position (pure_list_seek). */
+size_t pure_list_find_row(const PureList *list, unsigned field, PureCell key, bool *found);
+PureResult pure_list_set_row(PureList *list, size_t row, unsigned field, PureCell value, PureUndo *undo);
/* The bytes it keeps beside its items for that. */
size_t pure_list_extra(const PureList *);
/* An event's list (empty, never shared, journaled or undone) may keep its