Common Lisp Package: WEBLOCKS-ELEPHANT

A driver for weblocks backend store API that connects to Elephant.

README:

FUNCTION

Public

MAKE-PROXY-INSTANCE (CLASS-NAME &REST ARGS)

Creates an instance of the proxy.

Private

ADVANCED-ORDER-OBJECTS-IN-MEMORY (SEQ ORDER-BY)

Orders objects in 'seq' according to 'order-by'.

COUNT-PERSISTENT-STANDARD-OBJECTS (STORE CLASS-NAME)

Count class instances

FIND-PERSISTENT-STANDARD-OBJECTS (STORE CLASS-NAME &KEY ORDER-BY RANGE FILTER-FN)

This implements a slow version of lookup

HAS-INDEX (CLASS-REF SLOT)

Test whether a given class has an index on its slot. This helps us optimize find-persistent-objects

Undocumented

DEF-TO-PROXY-SLOT (DEF)

DELETE-PERSISTENT-STANDARD-OBJECT-BY-ID (STORE CLASS-NAME OBJECT-ID)

ENSURE-STANDARD-OBJECT-INDEX (STORE)

FILTER-OBJECTS-IN-MEMORY (OBJECTS FN &AUX RESULTS)

FIND-PERSISTENT-STANDARD-OBJECT-BY-ID (STORE CLASS-NAME OBJECT-ID)

MAKE-RANGED-COLLECTOR (COLLECTOR RANGE)

MAKE-STANDARD-OBJECT-INDEX (STORE)

MULTI-VALUE-SORT-PREDICATE-ASC (ORDER-BY)

RETURN-PROXY-CLASSNAME (CLASSNAME)

MACRO

Public

DEFPCLASS (CNAME PARENTS SLOT-DEFS &REST CLASS-OPTS)

Shorthand for defining persistent objects. Wraps the main class definition with persistent-metaclass

Private

Undocumented

AIF (PRED CON ALT)

WITH-RANGED-COLLECTOR ((VAR RANGE) &BODY BODY)

WITH-STORE-CONTROLLER (STORE &BODY BODY)

GENERIC-FUNCTION

Private

ADD-INDEX (BT &KEY INDEX-NAME KEY-FORM POPULATE)

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, a function call form eg '(create-index 3) or a lambda expression -- actual functions aren't supported. Lambda expresssions are converted to functions through compile and function call forms are transformed applying the first element of the list to the rest of the list. 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!)

CLOSE-STORE (STORE)

Closes a connection to the store. If the value of *default-store* is equal to 'store', *default-store* must be set to NIL.

FIND-ITEM (ITEM PSET &KEY KEY TEST (TEST #'EQUAL TEST-SUPPLIED-P))

Find a an item in the pset using key and test

INSERT-ITEM (ITEM PSET)

Insert a new item into the pset

OPEN-STORE (STORE-TYPE &REST ARGS &KEY SPEC &ALLOW-OTHER-KEYS)

Opens a connection to a store specified by 'store-type'. This function must return the instance of the connection to the store. Methods can accept any number of custom keyword parameters. Additionally, the function must set *default-store* to the value of newly created store.

SLOT-ACCESSOR

Private

Undocumented

ELEPHANT-CONTROLLER (OBJECT)

SETFELEPHANT-CONTROLLER (NEW-VALUE OBJECT)

ELEPHANT-STDOBJ-INDEX (OBJECT)

SETFELEPHANT-STDOBJ-INDEX (NEW-VALUE OBJECT)

PROXY-OID (OBJECT)

SETFPROXY-OID (NEW-VALUE OBJECT)

VARIABLE

Private

Undocumented

*PROXIES*

*VIEW-PROXIES*

CLASS

Public

Undocumented

ELEPHANT-STORE

Private

Undocumented

PERSISTENT-PROXY