Comprehensive clojure.spec definitions for RLM data structures.
This namespace centralizes ALL specs for the RLM system to provide a clear view of the complete data model. Individual namespaces will require this namespace and use these specs for validation.
Data Model Philosophy:
:node/*, :page/*, :toc/*):node/parent-id creates hierarchy (nil for root nodes)Comprehensive clojure.spec definitions for RLM data structures. This namespace centralizes ALL specs for the RLM system to provide a clear view of the complete data model. Individual namespaces will require this namespace and use these specs for validation. Data Model Philosophy: - FLAT structure with parent references (Datalevin-style) - All keywords are namespaced (`:node/*`, `:page/*`, `:toc/*`) - Vector of maps output (not nested trees) - `:node/parent-id` creates hierarchy (nil for root nodes)
(explain-document document)Returns explanation of why document is invalid (or nil if valid).
Returns explanation of why document is invalid (or nil if valid).
(explain-documents documents)Returns explanation of why documents vector is invalid (or nil if valid).
Returns explanation of why documents vector is invalid (or nil if valid).
(explain-flat-structure structure)Returns explanation of why flat structure is invalid (or nil if valid).
Returns explanation of why flat structure is invalid (or nil if valid).
(explain-node node)Returns explanation of why node is invalid (or nil if valid).
Returns explanation of why node is invalid (or nil if valid).
(valid-document? document)Returns true if document is valid according to ::document spec.
Returns true if document is valid according to ::document spec.
(valid-documents? documents)Returns true if documents vector is valid according to ::documents spec.
Returns true if documents vector is valid according to ::documents spec.
(valid-flat-structure? structure)Returns true if flat structure is valid according to ::flat-structure spec.
Returns true if flat structure is valid according to ::flat-structure spec.
(valid-node? node)Returns true if node is valid according to ::node spec.
Returns true if node is valid according to ::node spec.
(validate-parent-refs flat-structure)Validates that all :node/parent-id values point to existing nodes.
Returns:
{:valid? true} if all parent refs are valid{:valid? false :errors [...]} if there are orphaned nodesValidates that all :node/parent-id values point to existing nodes.
Returns:
- `{:valid? true}` if all parent refs are valid
- `{:valid? false :errors [...]}` if there are orphaned nodescljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |