hyperphor.tunamelt.store

Storage backend protocol. Keys are {:realm :type :id} maps. In cljs every method returns a Promise of the documented value.

Store

protocol

members

get*

(get* store k)

Return {:key :obj :meta} for k, or nil.

search*

(search* store query opts)

Return entries (plus :rank, :snippet) whose text matches query, best first. opts: :type, :realm, :limit, :raw?.

types*

(types* store realm)

Return {type count} for all stored types, optionally limited to realm.

delete*

(delete* store k)

Delete k and its history. Returns true if something was deleted.

referrers*

(referrers* store uri opts)

Return entries (plus :attr) whose attributes hold uri. opts: :attr, :type.

put-many*

(put-many* store entries)

Put a seq of k obj opts in one transaction.

history*

(history* store k)

Return revisions of k, newest first, as {:key :obj :meta}.

put*

(put* store k obj opts)

Upsert obj at key k. opts: {:mode :mutable|:append-only}. Returns the entry.

find*

(find* store type G__3232)

Return seq of {:key :obj :meta} of type, newest first.