Node: Collections, Next: , Previous: Persistent Objects, Up: Reference



Collections

elephant:persistent-collection Class
Class precedence list: persistent-collection, persistent, standard-object, t

Abstract superclass of all collection types.

elephant:btree Class
Class precedence list: btree, persistent-collection, persistent, standard-object, t

A hash-table like interface to a BTree, which stores things in a semi-ordered fashion.

elephant:indexed-btree Class
Class precedence list: indexed-btree, persistent-object, btree, persistent-collection, persistent, standard-object, t

A BTree which supports secondary indices.

elephant:btree-index Class
Class precedence list: btree-index, persistent-object, btree, persistent-collection, persistent, standard-object, t

Secondary index to an indexed-btree.

elephant:get-value key bt Generic Function
Get a value from a Btree.

elephant:get-value key (bt btree-index) Method
Get the value in the primary db from a secondary key.

(setf elephant:get-value) Generic Function
Put a key / value pair into a BTree.

(setf elephant:get-value) value key (bt btree-index) Method
Puts are not allowed on secondary indices. Try adding to the primary.

(setf elephant:get-value) value key (bt indexed-btree) Method
Set a key / value pair, and update secondary indices.

elephant:remove-kv key bt Generic Function
Remove a key / value pair from a BTree.

elephant:remove-kv key (bt btree-index) Method
Remove a key / value from the primary by a secondary lookup, updating all other secondary indices.

elephant:remove-kv key (bt indexed-btree) Method
Remove a key / value pair, and update secondary indices.

elephant:add-index bt &key index-name key-form populate Generic Function
Add a secondary index. The indices are stored in an eq hash-table, so the index-name should be a symbol. key-form should be a symbol naming a function, or a list which defines a lambda -- actual functions aren't supported. The function should take 3 arguments: the secondary db, primary key and value, and return two values: a boolean indicating whether to index this key / value, and the secondary key if so. If populate = t it will fill in secondary keys for existing primary entries (may be expensive!)

elephant:get-index bt index-name Generic Function
Get a named index.

elephant:get-primary-key key bt Generic Function
Get the primary key from a secondary key.

elephant:remove-index bt index-name Generic Function
Remove a named index.