(add-items compound items)
Adds the given items to the compound, cascading the additions to the secondary indexes. If the key exists, handle the conflict as specified in the primary index definition.
Adds the given items to the compound, cascading the additions to the secondary indexes. If the key exists, handle the conflict as specified in the primary index definition.
(add-secondary-index compound index-def)
Adds an additional secondary index to an existing compound. Throws if there is there is a conflict on the index id.
Adds an additional secondary index to an existing compound. Throws if there is there is a conflict on the index id.
(apply-diff c diff)
(compound opts)
(diff source target)
Returns a diff which will provide the information required to turn the source compound into the target compound, so that source can be turned into target in the following format.
{:inserts ... items that exist only in source, and not in target :updates {:source ... :target ...} source and target items that exist in source and target, but are different :deletes ... items that exist in target, but not in source
This is useful when e.g. syncing a compound with an external mutable datastructure
Returns a diff which will provide the information required to turn the _source_ compound into the _target_ compound, so that source can be turned into target in the following format. {:inserts ... items that exist only in source, and not in target :updates {:source ... :target ...} source and target items that exist in source and target, but are different :deletes ... items that exist in target, but not in source This is useful when e.g. syncing a compound with an external mutable datastructure
(empty-compound opts)
(id index-def)
(index compound id)
(index-def compound id)
(index-defs-by-id compound)
(indexes-by-id compound)
(items compound)
Returns the items indexed by the compound
Returns the items indexed by the compound
(primary-index compound)
(primary-index-def compound)
(primary-index-fn compound)
(primary-index-id compound)
(remove-keys compound ks)
Remove items from the compound with the given primary keys
Remove items from the compound with the given primary keys
(remove-secondary-index compound id)
Remove the secondary index with the provided id from the compound
Remove the secondary index with the provided id from the compound
(secondary-index compound id)
(secondary-index-def compound id)
(secondary-index-defs-by-id compound)
(secondary-indexes-by-id compound)
(set-primary-index compound primary-index)
(set-secondary-index-defs-by-id compound secondary-index-defs-by-id)
(set-secondary-indexes-by-id compound secondary-indexes-by-id)
(structure compound)
(update-item compound k f)
(update-item compound k f & args)
Update the item with the given primary key, cascading updates to the secondary indexes
Update the item with the given primary key, cascading updates to the secondary indexes
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close