This is the API reference. There is also an introduction to this library.
The code is released under the Lisp Lesser GPL.
Download shortcut: anardb.tar.gz.
ANARDB together with this documentation can be downloaded from anardb.tar.gz.
with-transaction (&key message store on-restart) declaration* statement* => result
Protect changes to a store with a transaction. If the transaction fails (because another process updated the store before the changes could be saved) then the store will be rolled forward and the BODY will be run again. Rolls the store forward to the latest serialisation on start, if the file serialisation is newer than the last one loaded. Note that it will wipe unsaved changes to the store iff the last serialisation loaded is older than the newest available serialisation. Therefore it will not wipe unsaved changes if the store is not backed with a directory, or no other process has written to the store since the last load. If with-transaction returns normally, then it is successful and the changes have been committed to disk.
defdbclass name direct-supers direct-slots &rest options => result
Define a class of serialisable objects. Syntax is like defclass but accessors and initargs are defined by default. Additional slot option :index specifies whether a slot's value should be indexed in a hash table. Note that changing an indexed slot's value is not supported. Additional class option :finder specifies the name of a helper function (by default (symbolicate 'find- classname)), which can be used to lookup class instances. Additional class option :store specifies the variable pointing to the store responsible for objects of this class.
with-store-lock (store) declaration* statement* => result
Prevent the store from being updated. Note that if you wait too long, the lock may be broken by another process. See *hard-break-delay*.
Base class of all classes defined through defdbclass
retrieve-all-instances class => result
Retrieve a list of instances of class CLASS
store-init-dir store &optional new-dir => result
Create a new database in the file-system
store-object-id (condition store-object) => result
(setf (store-object-id (condition store-object)) new-value)
automatically generated reader method
store-dir instance => result
(setf (store-dir instance) new-value)
A place for clients to stash things.
restart-transaction => result
Restart the innermost transaction
drop object => result
Remove object from the database
store-wipe store => result
freshen-object object => result
store-reset store &optional new-dir => result
do-all-instances (var class) declaration* statement* => result
object-absent &rest args => result
assert-in-transaction &optional store => result
make-store &key (next-id dum0) (dir dum1) (version dum2) (classnames dum3) => result
store-object-id condition => result
(setf (store-object-id condition) new-value)
store-object-id (condition object-absent) => result
(setf (store-object-id (condition object-absent)) new-value)
store-update store => result
retrieve-instance-by-id classname id => result
retrieve-instance-by-id (classname class) id => result
drop (object store-object) => result
drop object => result
drop (object sequence) => result
This documentation was prepared with a modified version of DOCUMENTATION-TEMPLATE.
$Header: /usr/local/cvsrep/documentation-template/output.lisp,v 1.14 2008/05/29 08:23:37 edi Exp $
BACK TO THE MAIN PROJECT PAGE