hyperphor.tunamelt.core
Public API: put/get/find/delete/history of JSON-able objects under hyperphor://realm/type/id URIs.
ClojureScript (IndexedDB) API docs: cljs/index.html.
configure!
(configure! {:keys [store realm]})Set :store (a Store, or a SQLite path string) and/or :realm. Returns nil.
find
(find type)(find type opts)Seq of {:uri :obj :meta} of type, newest first. opts: :realm, :since/:until (inst or epoch ms), :limit, :attrs {k v} where v is a scalar (matches any value), a vector (must contain all), or nil (attr absent).
history
(history uri)Revisions of uri, newest first (a single entry for :mutable objects).
put
(put uri-or-type obj)(put uri-or-type obj opts)Upsert obj at a URI, or at a new id under bare type. opts {:mode :mutable|:append-only}; mode is fixed at creation. Returns {:uri :obj :meta}. Keyword values read back as strings.
referrers
(referrers uri)(referrers uri opts)Entries (plus :attr) of objects referring to uri, newest first. opts: :attr, :type.
search
(search query)(search query opts)Entries whose text attribute values match query, best first, each plus :rank and :snippet. Every word must match as a prefix; opts: :type, :realm, :limit, :raw? (query is FTS5 syntax).
types
(types)(types {:keys [realm counts?]})Sorted seq of stored type names, or a sorted {type count} map if :counts? is true. opts: :realm limits to one realm.