Common Lisp Package: ELEPHANT

Elephant: an object-oriented database for Common Lisp with multiple backends for Berkeley DB, SQL and others.

README:

FUNCTION

Public

ADD-PACKAGE-CONVERSION

Users can specify wholesale package name conversions on upgrade prior to migrating old databases

ADD-SYMBOL-CONVERSION

Users can specify specific symbol conversions on upgrade prior to migrating old databases

ADD-TO-ROOT

Add an arbitrary persistent thing to the root, so you can retrieve it in a later session. Anything referenced by an object added to the root is considered reachable and thus live

CLOSE-STORE

Conveniently close the store controller. If you pass a custom store controller, you are responsible for setting it to NIL.

DROP-INSTANCE-SLOTS

A helper function for drop-instance, that deletes the storage of persistent slots of instance from the db

DROP-INSTANCES (INSTANCES &KEY (SC *STORE-CONTROLLER*) (TXN-SIZE 500))

Removes a list of persistent objects from all class indices and unbinds any persistent slot values associated with those instances

DUMP-BTREE

Print the contents of a btree for easy inspection & debugging

GET-FROM-ROOT

Get the value associated with key from the root. Returns two values, the value, or nil, and a boolean indicating whether a value was found or not (so you know if nil is a value or an indication of non-presence)

GET-QUERY-INSTANCES (CONSTRAINTS)

Get a list of instances according to the query constraints

MAKE-BTREE

Constructs a new BTree instance for use by the user. Each backend returns its own internal type as appropriate and ensures that the btree is associated with the store-controller that created it.

MAKE-INDEXED-BTREE

Constructs a new indexed BTree instance for use by the user. Each backend returns its own internal type as appropriate and ensures that the btree is associated with the store-controller that created it.

MAP-CLASS (FN CLASS &KEY COLLECT OIDS (SC *STORE-CONTROLLER*))

Perform a map operation over all instances of class. Takes a function of one argument, a class instance.

MAP-CLASS-QUERY (FN CONSTRAINTS)

Map instances using the query constaints to filter objects, exploiting slot indices (for last query) and stack allocated test closures. This is a minimally optimizing version that uses the first index it finds, and then does a nested loop join on the rest of the parameters.

MAP-INVERTED-INDEX (FN CLASS INDEX &REST ARGS &KEY START END (VALUE NIL VALUE-P) FROM-END COLLECT OIDS)

map-inverted-index maps a function of two variables, taking key and instance, over a subset of class instances in the order defined by the index. Specify the class by classname or class object and index by quoted name. The index may be a slot index, derived index, or a valued association slot. To map only a subset of key-value pairs, specify the range using the :start and :end keywords; all elements greater than or equal to :start and less than or equal to :end will be traversed regardless of whether the start or end value is in the index. Use nil in the place of start or end to specify the first element or last element, respectively. To map a single value, iff it exists, use the :value keyword. This is the only way to travers all nil values. To map from :end to :start in descending order, set :from-end to true. If :value is used, :from-end is ignored The 'oids' argument passes the oid of the instance to the provided function instead of the recreated instance.

MAP-ROOT

Takes a function of two arguments, key and value, to map over all key-value pairs in the root

OPEN-STORE

Conveniently open a store controller. Set *store-controller* to the new controller unless it is already set (opening a second controller means you must keep track of controllers yourself. *store-controller* is a convenience variable for single-store applications or single-store per thread apps. Multi-store apps should either confine their *store-controller* to a given dynamic context or wrap each store-specific op in a transaction using with or ensure transaction. Returns the opened store controller.

REMOVE-FROM-ROOT

Remove something from the root by the key value

ROOT-EXISTSP

Test whether a given key is instantiated in the root

SET-OID-SPEC (SPEC)

Set to nil to perform oid mapping in memory, set to a valid spec to perform the mapping on disk

TRANSLATE-AND-INTERN-SYMBOL

Service for the serializer to translate any renamed packages or symbols and then intern the decoded symbol.

Undocumented

ADD-ASSOCIATION (INSTANCE SLOT ASSOCIATED)

ASSOCIATEDP (INSTANCE SLOT ASSOCIATED)

BTREE-KEYS

CLOSE-ALL-STORES

DUMP-INDEX

GET-ASSOCIATION-INDEX (SLOT-DEF SC)

GET-ASSOCIATIONS (INSTANCE SLOT)

MAKE-DUP-BTREE

MAKE-PSET (&KEY ITEMS PSET (SC *STORE-CONTROLLER*))

REMOVE-ASSOCIATION (INSTANCE SLOTNAME ASSOCIATED)

REMOVE-CURRENT-KV

Private

BUILD-CONTROLLER

Actually construct the controller & load dependencies

CLASS-INSTANCE-SCHEMA (CLASS-OBJ)

Compute a schema representation from an instance of persistent-metaclass

COMPUTE-BINDINGS (CLASS SLOTS BINDINGS)

Helper function for bind-slot-defs

COMPUTE-SLOT-RECS (CLASS-OBJ &OPTIONAL (SLOT-TAG-MAP *SLOT-DEF-TYPE-TAGS*))

For each slot, compute a serializable record of the important info in that slot

COPY-PERSISTENT-OBJECT (DSTSC SRC)

Copy the persistent object reference by making a new one and potentially copy over the slot values as well

COPY-PERSISTENT-SLOTS (DSTSC DST CLASS SRC)

Copy only persistent slots from src to dst

DERIVED-INDEX-UPDATER (CLASS INSTANCE WRITTEN-SLOT-DEF)

Compute the derived indices to update from the slot-def that is being written to. Should be called in a transaction

DESERIALIZE (BS SC &OPTIONAL OID-ONLY)

Generic interface to serialization that dispatches based on the current Elephant version

DESERIALIZE-DATABASE-VERSION-VALUE (BS)

Deserializes the 3 integer list from buffer stream bs

DESERIALIZE-FROM-BASE64-STRING (X SC)

Decode a base64-string using the store controller's deserialize method

DROPPED-INSTANCE-P

An instance has not been dropped if it is in the instance table and has a valid class id

ENSURE-SLOT-DEF-INDEX (SLOT-DEF SC)

If a slot's index does not exist, create it

FINALIZE (OBJECT FUNCTION &KEY DONT-SAVE)

Arrange for the designated FUNCTION to be called when there are no more references to OBJECT, including references in FUNCTION itself. If DONT-SAVE is true, the finalizer will be cancelled when SAVE-LISP-AND-DIE is called: this is useful for finalizers deallocating system memory, which might otherwise be called with addresses from the old image. In a multithreaded environment FUNCTION may be called in any thread. In both single and multithreaded environments FUNCTION may be called in any dynamic scope: consequences are unspecified if FUNCTION is not fully re-entrant. Errors from FUNCTION are handled and cause a WARNING to be signalled in whichever thread the FUNCTION was called in. Examples: ;;; GOOD, assuming RELEASE-HANDLE is re-entrant. (let* ((handle (get-handle)) (object (make-object handle))) (finalize object (lambda () (release-handle handle))) object) ;;; BAD, finalizer refers to object being finalized, causing ;;; it to be retained indefinitely! (let* ((handle (get-handle)) (object (make-object handle))) (finalize object (lambda () (release-handle (object-handle object))))) ;;; BAD, not re-entrant! (defvar *rec* nil) (defun oops () (when *rec* (error "recursive OOPS")) (let ((*rec* t)) (gc))) ; or just cons enough to cause one (progn (finalize "oops" #'oops) (oops)) ; GC causes re-entry to #'oops due to the finalizer ; -> ERROR, caught, WARNING signalled

FLUSH-CACHED-SLOTS (INSTANCE SLOTS)

Assumes object is checked out

GEN-DERIVED-FN-WRAPPER (COMPILED)

Return a closure to handle errors in the derived index function

GEN-DERIVED-SYM-WRAPPER (SYMBOL-FN)

Return a closure to handle errors in the derived index function

GET-CACHE (KEY CACHE)

Get a value from a cache-table.

GET-CONTROLLER

This is used by open-store to fetch or open a controller. This maintains the dbconnection-spec table so should be the only point of entry for getting access to controllers from specs. Get-con is used to validate connections and reopen if necessary and perhaps these two should be combined at some point

GET-CONTROLLER-INDEX (SLOT-DEF SC)

Get the slot-def's index from the store

GET-DB-SCHEMAS

Return schemas ordered oldest to youngest (ascending cids)

GET-USER-CONFIGURATION-PARAMETER

This function pulls a value from the key-value pairs stored in my-config.sexp so data stores can have their own pairs for appropriate customization after loading.

INHIBITED-CLASS-COPY-P (CLASSNAME)

Ignore all classes that

INITIALIZE-MIGRATE-DUPLICATE-DETECTION

Reset oid map so that all references to a given object in the source only point to one copy in the target

INT-BYTE-SPEC (POSITION)

Shared byte-spec peformance hack; not thread safe so removed from use for serializer2

KNOWN-CLASSES (SC)

Return all classes that are known both to SC and the current Lisp image.

LISP-COMPARE-EQUAL

A lisp compare equal in same spirit as lisp-compare<. Case insensitive for strings.

LISP-COMPARE<

A comparison function that mirrors the ordering of the data stores for < on all sortable types. It does not provide ordering on non-sorted values other than by type class (i.e. not serialized lexical values)

LISP-COMPARE<=

A comparison function that mirrors the ordering of the data stores for <= on all sortable types. It does not provide ordering on non-sorted values other than by type class (i.e. not serialized lexical values)

LIVE-MEMORY-OBJECTS (SC)

Return the list of oids and list of instances currently in memory. This should be equal to the set of live objects.

MAKE-CACHE-TABLE (&REST ARGS)

Make a values-weak hash table: when a value has been collected, so are the keys.

MAKE-TRANSACTION-RECORD (SC TXN &OPTIONAL PRIOR)

Backends must use this to assign values to *current-transaction* binding

MAKE-WEAK-POINTER (OBJECT)

Allocate and return a weak pointer which points to OBJECT.

MAP-TUPLE-RANGE (SEQ RANGE &OPTIONAL (MAP-FN #'CDR))

Returns a list of elements from tuples returned by map-fn on the sequence elements that are within the range on seq

MARK-MEMORY (SC)

Inhibit loading new objects while we extract the live items from the cache and then walk them from outside the lockup. The cache lock is acquired for any lookup of an object from the cache - i.e. when the system is reading in a new object.

MARK-MEMORY-FINAL (SC)

We need to ensure that any loaded objects that are unlinked and not yet written back to a live variable are marked prior to the sweep. This locks the cache up for the longest period as we want to be completely quiescent (no new objects) until we have an accurate mark list for the system

MARK-NEW-WRITES (SC OIDS INSTS)

Mark newly written objects, walking if not already marked

MAYBE-REFRESH-CLASS (CLASS)

Call ensure-schema, but only as needed (if slots were recomputed) and go through subclasses recursively (required for current versions of SBCL and CCL, but not AllegroCL and Lispworks

MIGRATE-FROM-LEGACY (DST SRC)

Perform a wholesale repository migration from the root. Also acts as a poor man's GC if you copy to another store of the same type!

OBJECT-WAS-COPIED-P (SRC)

Test whether a source object has been copied

OWNED-TXN-P (SC REC)

For debugging

PRIOR-OWNED-TXN (SC PARENT-TXN-REC)

Search for a prior txn owned by this store

PRIOR-VERSION-P

Is v1 an equal or earlier version than v2

REBUILD-SLOT-INDICES (SC CLASS)

Rebuild all slot indices for CLASS, or all known classes if CLASS is NIL. CLASS may be a class or class name.

REFRESH-CACHED-SLOTS (INSTANCE SLOTS)

Assumes checkout mode is t so side effects are only in memory

REGISTER-COPIED-OBJECT (SRC DST)

When copying a source object, store it in the oid map

REGISTER-DATA-STORE-CON-INIT

Data stores must call this function during the loading/compilation process to register their initialization function for the tag name in *elephant-data-stores*. The initialization function returns a fresh instance of the data stores store-controller subclass

RETRIEVE-COPIED-OBJECT (DST SRC)

Get a copied object from the oid map

SERIALIZE (FROB BS SC)

Generic interface to serialization that dispatches based on the current Elephant version

SERIALIZE-DATABASE-VERSION-KEY (BS)

Given a buffer-stream, encode a key indicating the version using the constant +elephant-version+

SERIALIZE-DATABASE-VERSION-VALUE (VERSION BS)

Serializes a list containing three integers to the buffer stream bs

SERIALIZE-TO-BASE64-STRING (X SC)

Encode object using the store controller's serializer format, but encoded in a base64

SETF-CACHE (KEY CACHE VALUE)

Set a value in a cache-table.

SLOT-DEFS-FROM-SCHEMA (SCHEMA ARGS)

Need to handle default-initargs and other options to defclass

SLOT-INDICES-SANE-P (SC CLASS &REST ARGS)

Check slot index sanity for CLASS or all classes known to SC if CLASS is NIL.

SLOT-REC-ARGS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SLOT-REC-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SLOT-REC-TYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SLOTS-AND-VALUES (O)

List of slot names followed by values for object

SORT-TUPLES (SEQ ORDER-BY &OPTIONAL (KEY-FN #'CAR))

Orders elements in the sequence using values returned by key-fn

STRUCT-SLOTS-AND-VALUES (OBJECT)

List of slot names followed by values for structure object

SUPERCLASS-MEMBER-P (CLASS SUPERCLASSES)

Searches superclass list for class

SWEEP-CLASS (SC CID STEP &KEY TEST (START 0))

Sweep over the class and reclaim instances

SWEEP-INSTANCE (SC OID)

Drop an instance unless it is marked

SWEEP-UNINDEXED-CLASSES (SC &OPTIONAL TEST (STEP 5))

For each unindexed class, sweep all instances that are not on the mark list. One txn per class for now

TOPOLOGICAL-SORT (GRAPH &KEY (TEST 'EQL))

Graph is an association list whose keys are objects and whose values are lists of objects on which the corresponding key depends. Test is used to compare elements, and should be a suitable test for hash-tables. Topological-sort returns two values. The first is a list of objects sorted toplogically. The second is a boolean indicating whether all of the objects in the input graph are present in the topological ordering (i.e., the first value).

TRANSACTION-OBJECT (TXNREC)

Get the backend-specific transaction object

TRANSACTION-STORE (TXNREC)

Get the store that owns the transaction from a transaction record

TYPE-NUM (OBJ)

Define a type order; no guarantee that backend and front-end match so we can't iterate over types, just all members of a give type class (i.e. numbers, etc)

UPDATE-ASSOCIATION-END (CLASS INSTANCE SLOT-DEF TARGET)

Get the association index and add the target object as a key that refers back to this instance so we can get the set of referrers to target

UPDATE-DERIVED-SLOT (CLASS INSTANCE DERIVED-SLOT-DEF)

Make a copy of the functionality here to be more efficient

UPDATE-IN-MEMORY-OBJECTS (SRC DST)

Takes all in-memory objects from src and maps the instances into the dst store. After this call, all in-memory references point into the new store, the objects used to copy into migrate have been flushed and the original store cache is also flushed.

UPDATE-OTHER-ASSOCIATION-END (CLASS INSTANCE SLOT-DEF OTHER-INSTANCE)

Update the association index for the other object so that it maps from us to it. Also add error handling.

UPDATE-SLOT-INDEX (SC CLASS INSTANCE SLOT-DEF NEW-VALUE)

Update an index value when written

VALID-PERSISTENT-REFERENCE-P (OBJECT SC)

Ensures that object can be written as a reference into store sc

WARN-ON-REINITIALIZATION-DATA-LOSS (CLASS)

Warnings at class def time: - set-valued/assoc (warn!) - persistent/indexed/cached (warn?) - derived hints? Be nice to be able to restore the slots rather than just avoid updating

WEAK-POINTER-VALUE (WEAK-POINTER)

If WEAK-POINTER is valid, return the value of WEAK-POINTER and T. If the referent of WEAK-POINTER has been garbage collected, returns the values NIL and NIL.

Undocumented

%BIGNUM-REF (BIGNUM I)

ADD-ASSOCIATION-SLOT-INDEX (IDX SLOT-DEF SC)

ADD-PERSISTENT-METACLASS-ARGUMENT (CLASS-OPTS)

ALL-PERSISTENT-COLLECTIONS (SC)

ALL-PERSISTENT-SLOT-NAMES (CLASS)

ALL-SINGLE-VALUED-SLOT-DEFS (CLASS)

AND-EXPR-P (EXPR)

APPLY-SCHEMA-CHANGE-FN (INSTANCE EXPR OLD-SCHEMA)

ARRAY-TYPE-FROM-BYTE (B)

ARRAY-TYPE= (T1 T2)

ASSERT-SLOT-INDEX-SANITY (SC CLASS SLOTNAME)

ASSERT-SLOT-INDEX-SANITY-FOR-CLASS (SC CLASS)

ASSOCIATION-END-P (SLOT-DEF)

ASSOCIATION-END-SLOT-NAMES (CLASS)

ASSOCIATION-SLOT-DEFS (CLASS)

ASSOCIATION-SLOT-NAMES (CLASS)

BYTE-FROM-ARRAY-TYPE (TY)

CACHED-SLOT-DEFS (CLASS)

CACHED-SLOT-NAMES (CLASS)

CDRS (LIST)

CHECK-VALID-STORE-CONTROLLER (SC)

CLASS-SCHEMA-ID

CLEANUP-GC (SC TEST)

CLEAR-MIGRATE-DUPLICATE-DETECTION

COMPARISON-CONSTRAINT-P (CONSTRAINT)

COMPILE-DERIVED-FN (REF)

COMPUTE-DERIVED-INDEX-TRIGGERS (E-SLOTS)

COMPUTE-READER (CLASSNAME NAME OVERRIDE-FN TEMPLATE-FN)

COMPUTE-TRANSIENT-SCHEMA (CLASS-OBJ)

COMPUTE-TRANSIENT-SLOT-RECS (CLASS-OBJ)

COMPUTE-WRITER (CLASSNAME NAME OVERRIDE-FN TEMPLATE-FN)

CONVERT-BUFFER-FROM-BASE64-STRING (STRING SC)

CONVERT-BUFFER-TO-BASE64-STRING (BS SC)

COPY-CINDEX-CONTENTS (SC OLDIDX)

COPY-SCHEMA (TYPE SCHEMA)

COPY-SLOT-REC (INSTANCE)

COUNT-TRUE (&REST ARGS)

DEFAULT-TEMPLATE (CLASSNAME NAME TYPE)

DELETE-CON-SPEC

DESERIALIZE-DATABASE-SERIALIZER-VERSION-VALUE (BS)

DESERIALIZE-SYSTEM-INTEGER (BS)

DIFF-RECS (DIFF-ENTRY)

DIFF-TYPE (DIFF-ENTRY)

DUMP-CACHE (CACHE)

DUMP-CLASS-SCHEMA-STATUS (SC CLASSNAME &OPTIONAL (STREAM T))

DUMP-SCHEMA (SCHEMA &OPTIONAL (STREAM T))

DUMP-SLOTS (SCHEMA)

ELEPHANT-DESERIALIZATION-ERROR-REPORT (CONDITION STREAM)

ENSURE-CLASS-INHERITS-FROM (CLASS FROM-CLASSNAMES DIRECT-SUPERCLASSES)

ENSURE-FINALIZED (CLASS)

ENSURE-TRANSIENT-CHAIN (SLOT-DEFINITIONS INITARGS)

FAST-LOOKUP-CON-SPEC

FIND-CLASS-FOR-DIRECT-SLOT (CLASS DEF)

FIND-DIRECT-SLOT-DEF-BY-NAME (CLASS SLOT-NAME)

FIND-SLOT-DEF-BY-NAME (CLASS SLOT-NAME)

FUNCTION<-KEYFORM

GET-ASSOC-VALUE (VALUE ALIST)

GET-ASSOCIATED (INSTANCE SLOT-DEF)

GET-ASSOCIATION-SLOT-INDEX (SLOT-DEF SC)

GET-CONTROLLER-ASSOCIATION-INDEX (SLOT-DEF SC)

GET-CURRENT-DB-SCHEMA

GET-FOREIGN-CLASS (SLOT-DEF)

GET-FOREIGN-SLOT (FCLASS SLOT-DEF)

GET-INIT-SLOTNAMES (CLASS ACCESSOR SLOT-NAMES)

GET-SLOT-RECS-BY-TYPE (TYPE SCHEMA)

GET-UNIQUE-VALUES (INDEX &AUX VALUES)

HAS-CACHED-SLOT-SPECIFICATION (DIRECT-SLOT-DEFS)

IDENTITY2 (K V)

IDENTITY3 (K V PK)

INDEXED-CLASSES (SC)

INDEXED-SLOT-REC-EQ (REC1 REC2)

INITIAL-PERSISTENT-SETUP (INSTANCE &KEY FROM-OID SC)

INITIALIZE-FROM-INITARG (CLASS INSTANCE SLOT-DEF SLOT-INITARGS INITARGS)

INITIALIZE-NEW-SLOTS (INSTANCE DIFF)

INITIALIZE-PERSISTENT-SLOTS (CLASS INSTANCE PERSISTENT-SLOT-INITS INITARGS OBJECT-EXISTS)

INITIALIZE-SET-SLOTS (CLASS INSTANCE SET-SLOTS)

INITIALIZE-USER-PARAMETERS

INSTANCE-CIDX-KEYFORM

INTERPRET-AND-CONSTRAINT (FN CONSTRAINT REST BINDINGS)

INTERPRET-CONSTRAINTS (FN CONSTRAINTS BINDINGS)

INTERPRET-OR-CONSTRAINT (FN CONSTRAINT REST BINDINGS)

INTERPRET-SINGLE-CONSTRAINT (FN CONSTRAINT BINDINGS)

KNOWN-CLASSES/SORTED (SC)

LISP-COMPARE>=

LOAD-DATA-STORE

LOGICAL-COPY-SCHEMA (TYPE SCHEMA)

LOOKUP-CON-SPEC

LOOKUP-DATA-STORE-CON-INIT

MAKE-BINDINGS (VARS)

MAKE-DB-SCHEMA (CID CLASS-SCHEMA)

MAKE-FINALIZER (KEY CACHE)

MAKE-SLOT-REC (&KEY ((TYPE DUM20) NIL) ((NAME DUM21) NIL) ((ARGS DUM22) NIL))

MAP-BTREE-FROM-END

MAP-BTREE-FROM-START

MAP-BTREE-VALUES

MAP-CACHE (FN CACHE)

MAP-INDEX-FROM-END

MAP-INDEX-FROM-START

MAP-INDEX-VALUES

MAP-LEGACY-NAMES

MAP-LEGACY-PACKAGE-NAMES

MAP-LEGACY-SYMBOLS

MARK-AND-SWEEP-GC (SC &OPTIONAL TEST)

MARK-OBJECT (OBJ)

MARK-ROOTS (SC &KEY (CHUNK-SIZE 100))

MATCH-SYMBOL-NAME (SYM1 SYM2)

MIGRATE-CLASS-INDEX-P (CLASS)

MIGRATE-CLASS-INSTANCES (DST CLASSNAME)

MIGRATE-FROM-CURRENT (DST SRC)

OR-EXPR-P (EXPR)

PERSISTENT-SLOT-DEFS (CLASS)

PERSISTENT-SLOT-NAMES (CLASS)

PLIST-VALUE (OBJECT NAME)

SETFPLIST-VALUE (NEW-VALUE OBJECT NAME)

PRINT-BTREE-ENTRY

PRINT-INDEX-ENTRY

PSET-RANGE-FOR-DESCENDING

QUERY-SELECT (FN EXPR)

QUERY-VARIABLE? (SYMBOL)

REFERENCE-VALUE (EXPR BINDINGS)

REGISTER-NEW-INSTANCE (INSTANCE CLASS SC)

RELATION-GENERIC-FUNCTION (REL)

RELATION-NUMBER-FUNCTION (REL)

RELATION-STRING-FUNCTION (REL)

REMCACHE (KEY CACHE)

REMOVE-ASSOCIATION-END (CLASS INSTANCE SLOT-DEF ASSOCIATED)

REMOVE-ASSOCIATION-SLOT-INDEX (SLOT-DEF SC)

RESET-BINDINGS (INST BINDINGS)

SATISFIED-BINDINGS-P (BINDINGS)

SATISFY-ASDF-DEPENDENCIES

SCHEMA-CLASSNAME-KEYFORM

SERIALIZE-DATABASE-SERIALIZER-VERSION-KEY (BS)

SERIALIZE-DATABASE-SERIALIZER-VERSION-VALUE (VERSION BS)

SERIALIZE-RESERVED-TAG (BS)

SERIALIZE-SYSTEM-INTEGER (INT BS)

SERIALIZE-SYSTEM-TAG (BYTE BS)

SET-CON-SPEC

SET-VALUED-SLOT-DEFS (CLASS)

SET-VALUED-SLOT-NAMES (CLASS)

SETUP-GC (SC)

SIGNAL-CONTROLLER-LOST-ERROR

SIGNAL-CROSS-REFERENCE-ERROR (OBJECT SC)

SIGNAL-MISSING-INSTANCE

SLOT-INDEX-SANE-P (SC CLASS SLOTNAME &KEY ERRORP)

SETFSLOT-REC-ARGS (NEW-VALUE INSTANCE)

SLOT-REC-EQ (REC1 REC2)

SETFSLOT-REC-NAME (NEW-VALUE INSTANCE)

SLOT-REC-P (OBJECT)

SETFSLOT-REC-TYPE (NEW-VALUE INSTANCE)

SLOW-LOOKUP-CON-SPEC

SORTED-SLOTS (TYPE SCHEMA)

SWEEP-DEBUG (SC OID)

SYMBOL< (SYM1 SYM2)

TEST-RELATION (REL IVAL TVALS)

TRANSACTION-OBJECT-P (TXNREC)

TRANSACTION-PRIOR (TXNREC)

TRANSIENT-SLOT-DEFS (CLASS)

TRANSIENT-SLOT-NAMES (CLASS)

TYPE-CHECK-ASSOCIATION (INSTANCE SLOT-DEF OTHER-INSTANCE)

TYPE< (OBJ1 OBJ2)

TYPE<= (OBJ1 OBJ2)

TYPE= (OBJ1 OBJ2)

UNINDEX-SLOT-VALUE (SC KEY VALUE OLD-NAME OLD-BASE)

UNINDEXED-CLASSES (SC)

VALIDATE-MAP-CALL

VAR-TYPE (VAR VARS)

WALK-INDEXED-CLASSES (SC)

WARN-ABOUT-DROPPED-SLOTS (OP CLASS NAMES)

MACRO

Public

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

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

ENSURE-TRANSACTION ((&REST KEYARGS &KEY (STORE-CONTROLLER '*STORE-CONTROLLER*) (PARENT '*CURRENT-TRANSACTION*) (RETRIES '*DEFAULT-RETRIES*) &ALLOW-OTHER-KEYS) &BODY BODY)

Execute the body with the existing transaction, or a new transaction if none is currently running. This allows sequences of database actions to be run atomically whether there is or is not an existing transaction (rather than relying on auto-commit). with-transaction nests transactions where as ensure-transaction can be part of an enclosing, flat transaction

SET-INSERT (ITEM OBJECT SLOTNAME)

Sugar for inserting items under #'equal from the set slot

SET-LIST (OBJECT SLOTNAME)

Sugar for getting a list from a set slot

SET-REMOVE (ITEM OBJECT SLOTNAME)

Sugar for removing items via #'equal from the set slot

WITH-BTREE-CURSOR ((VAR BT) &BODY BODY)

Macro which opens a named cursor on a BTree (primary or not), evaluates the forms, then closes the cursor.

WITH-OPEN-STORE ((SPEC) &BODY BODY)

Executes the body with an open controller, unconditionally closing the controller on exit.

WITH-PERSISTENT-CHECKOUTS (OBJECTS &REST BODY)

Make sure objects are checked out in the body and are checked back in when the form returns. This acts as a guard by

WITH-TRANSACTION ((&REST KEYARGS &KEY (STORE-CONTROLLER '*STORE-CONTROLLER*) (PARENT '*CURRENT-TRANSACTION*) (RETRIES '*DEFAULT-RETRIES*) &ALLOW-OTHER-KEYS) &BODY BODY)

Execute a body with a transaction in place. On success, the transaction is committed. Otherwise, the transaction is aborted. If the body deadlocks, the body is re-executed in a new transaction, retrying a fixed number of iterations. If nested, the backend must support nested transactions.

Undocumented

WITH-INHIBITED-WARNINGS (&BODY BODY)

WITH-STORE ((STORE) &BODY BODY)

Private

BIND-SLOT-DEFS (CLASS SLOTS BINDINGS &BODY BODY)

Bindings contain name, accessor pairs. Extract slot-definitions into variable name using accessor and filter by the list of valid slots

IN-GC-MARK-CONTEXT ((SC) &BODY BODY)

Establish binding for serializer to push instances and oids Walk the objects when the form exists if necessary

ITERATE-MAP-BTREE (&KEY START CONTINUE STEP)

In context with bound variables: cur, sc, value, start, end, fn Provide a start expression that returns index cursor values Provide a continue expression that uses the bound variables key, start, value or end to determine if the iteration should continue Provide a step expression that returns index cursor values.

ITERATE-MAP-INDEX (&KEY START CONTINUE STEP)

In context with bound variables: cur, sc, value, start, end, fn Provide a start expression that returns index cursor values Provide a continue expression that uses the bound variables key, start, value or end to determine if the iteration should continue Provide a step expression that returns index cursor values.

WITH-BATCH-TRANSACTION ((BATCH SIZE LIST &REST TXN-OPTIONS) &BODY BODY)

Perform a set of DB operations over a list of elements in batches of size 'size'. Pass specific transaction options after the list reference.

WITH-CURSOR-VALUES (EXPR &BODY BODY)

Binds exists?, skey, val and pkey from expression assuming expression returns a set of cursor operation values or nil

WITH-INHIBITED-SLOT-COPY ((&KEY &ALLOW-OTHER-KEYS) &BODY BODY)

A user macro to support special slot handling in persistent objects

WITH-MAP-COLLECTOR ((FN COLLECT-P) &BODY BODY)

Binds free var results to the collected results of function in symbol-argument fn based on boolean parameter collect-p, otherwise result is nil

WITH-MAP-INDEX-COLLECTOR ((FN COLLECT-P) &BODY BODY)

Binds free var results to the collected results of function in symbol-argument fn based on boolean parameter collect-p, otherwise result is nil

WITH-MAP-INDEX-WRAPPER ((FN BTREE COLLECT CUR) &BODY BODY)

Binds variable sc to the store controller, overrieds fn with a collector if dynamic value of collect is true and binds variable named cur to the current cursor

WITH-MAP-WRAPPER ((FN BTREE COLLECT CUR) &BODY BODY)

Binds variable sc to the store controller, overrieds fn with a collector if dynamic value of collect is true and binds variable named cur to the current cursor

Undocumented

BIND-STANDARD-INIT-ARGUMENTS ((INITARGS) &BODY BODY)

GC-MARK-NEW-WRITE (INST)

WITH-CURRENT-CURSOR ((CUR) &BODY BODY)

GENERIC-FUNCTION

Public

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!)

CONTROLLER-ABORT-TRANSACTION (STORE-CONTROLLER TRANSACTION &KEY &ALLOW-OTHER-KEYS)

Abort an elephant transaction

CONTROLLER-COMMIT-TRANSACTION (STORE-CONTROLLER TRANSACTION &KEY &ALLOW-OTHER-KEYS)

Commit an elephant transaction

CONTROLLER-START-TRANSACTION (STORE-CONTROLLER &KEY &ALLOW-OTHER-KEYS)

Start an elephant transaction

CURSOR-CLOSE (CURSOR)

Close the cursor. Make sure to close cursors before the enclosing transaction is closed!

CURSOR-CURRENT (CURSOR)

Get the key / value at the cursor position. Returns has-pair key value, where has-pair is a boolean indicating there was a pair.

CURSOR-DELETE (CURSOR)

Delete by cursor. The cursor is at an invalid position, and uninitialized, after a successful delete.

CURSOR-DUPLICATE (CURSOR)

Duplicate a cursor.

CURSOR-FIRST (CURSOR)

Move the cursor to the beginning of the BTree, returning has-pair key value.

CURSOR-GET-BOTH (CURSOR KEY VALUE)

Moves the cursor to a particular key / value pair, returning has-pair key value.

CURSOR-GET-BOTH-RANGE (CURSOR KEY VALUE)

Moves the cursor to the first key / value pair with key equal to the key argument and value greater or equal to the value argument. Not really useful for us since primaries don't have duplicates. Returns has-pair key value.

CURSOR-LAST (CURSOR)

Move the cursor to the end of the BTree, returning has-pair key value.

CURSOR-NEXT (CURSOR)

Advance the cursor, returning has-pair key value.

CURSOR-NEXT-DUP (CURSOR)

Move to the next duplicate element (with the same key.) Returns has-pair key value.

CURSOR-NEXT-NODUP (CURSOR)

Move to the next non-duplicate element (with different key.) Returns has-pair key value.

CURSOR-PCURRENT (CURSOR)

Returns has-tuple / secondary key / value / primary key at the current position.

CURSOR-PFIRST (CURSOR)

Moves the key to the beginning of the secondary index. Returns has-tuple / secondary key / value / primary key.

CURSOR-PGET-BOTH (CURSOR KEY VALUE)

Moves the cursor to a particular secondary key / primary key pair. Returns has-tuple / secondary key / value / primary key.

CURSOR-PGET-BOTH-RANGE (CURSOR KEY VALUE)

Moves the cursor to a the first secondary key / primary key pair, with secondary key equal to the key argument, and primary key greater or equal to the pkey argument. Returns has-tuple / secondary key / value / primary key.

CURSOR-PLAST (CURSOR)

Moves the key to the end of the secondary index. Returns has-tuple / secondary key / value / primary key.

CURSOR-PNEXT (CURSOR)

Advances the cursor. Returns has-tuple / secondary key / value / primary key.

CURSOR-PNEXT-DUP (CURSOR)

Move to the next duplicate element (with the same key.) Returns has-tuple / secondary key / value / primary key.

CURSOR-PNEXT-NODUP (CURSOR)

Move to the next non-duplicate element (with different key.) Returns has-tuple / secondary key / value / primary key.

CURSOR-PPREV (CURSOR)

Moves the cursor back. Returns has-tuple / secondary key / value / primary key.

CURSOR-PPREV-DUP (CURSOR)

Move to the previous duplicate element (with the same key.) Returns has-tuple / secondary key / value / primary key.

CURSOR-PPREV-NODUP (CURSOR)

Move to the previous non-duplicate element (with different key.) Returns has-tuple / secondary key / value / primary key.

CURSOR-PREV (CURSOR)

Move the cursor back, returning has-pair key value.

CURSOR-PREV-DUP (CURSOR)

Move to the previous duplicate element (with the same key.) Returns has-pair key value.

CURSOR-PREV-NODUP (CURSOR)

Move to the previous non-duplicate element (with different key.) Returns has-pair key value.

CURSOR-PSET (CURSOR KEY)

Moves the cursor to a particular key. Returns has-tuple / secondary key / value / primary key.

CURSOR-PSET-RANGE (CURSOR KEY)

Move the cursor to the first key-value pair with key greater or equal to the key argument, according to the lisp sorter. Returns has-pair secondary key value primary key.

CURSOR-PUT (CURSOR VALUE &KEY KEY)

Overwrite value at current cursor location. Cursor remains at the current location

CURSOR-SET (CURSOR KEY)

Move the cursor to a particular key, returning has-pair key value.

CURSOR-SET-RANGE (CURSOR KEY)

Move the cursor to the first key-value pair with key greater or equal to the key argument, according to the lisp sorter. Returns has-pair key value.

DROP-BTREE (BT)

Delete all key-value pairs from the btree and render it an invalid object in the data store

DROP-INSTANCE (PERSISTENT-OBJECT)

drop-instance reclaims persistent object storage by unbinding all persistent slot values. It can also helps catch errors where an object should be unreachable, but a reference still exists elsewhere in the DB. On access, the unbound slots should flag an error in the application program. IMPORTANT: this function does not clear any serialized references still in the db. Need a migration or GC for that! drop-instances is the user-facing call as it implements the proper behavior for indexed classes

DROP-PSET (PSET)

Release pset storage to database for reuse

DROP-SLOT-SET (PSET)

Release pset storage to database for reuse

EXISTSP (KEY BT)

Test existence of a key / value pair in a BTree

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

Find a an item in the pset using key and test

GET-INDEX (BT INDEX-NAME)

Get a named index.

GET-INSTANCE-BY-VALUE (PERSISTENT-METACLASS SLOT-NAME VALUE)

Retrieve instances from a slot index by value. Will return only the first instance if there are duplicates.

GET-INSTANCES-BY-CLASS (PERSISTENT-METACLASS)

Retrieve all instances from the class index as a list of objects

GET-INSTANCES-BY-RANGE (PERSISTENT-METACLASS SLOT-NAME START END)

Returns a list of all instances that match values between start and end. An argument of nil to start or end indicates, respectively, the lowest or highest value in the index

GET-INSTANCES-BY-VALUE (PERSISTENT-METACLASS SLOT-NAME VALUE)

Returns a list of all instances where the slot value is equal to value.

GET-PRIMARY-KEY (KEY BT)

Get the primary key from a secondary key.

GET-VALUE (KEY BT)

Get a value from a Btree.

SETFGET-VALUE (VALUE KEY BT)

Put a key / value pair into a BTree.

INSERT-ITEM (ITEM PSET)

Insert a new item into the pset

MAKE-CURSOR (BT)

Construct a cursor for traversing BTrees.

MAKE-SIMPLE-CURSOR (BT)

Allow users to walk secondary indices and only get back primary keys rather than associated primary values

MAP-BTREE (FN BTREE &REST ARGS &KEY START END VALUE FROM-END COLLECT (VALUE NIL VALUE-SET-P) &ALLOW-OTHER-KEYS)

Map btree maps over a btree from the value start to the value of end. If values are not provided, then it maps over all values. BTrees do not have duplicates, but map-btree can also be used with indices in the case where you don't want access to the primary key so we require a value argument as well for mapping duplicate value sets. The collect keyword will accumulate the results from each call of fn in a fresh list and return that list in the same order the calls were made (first to last).

MAP-INDEX (FN INDEX &REST ARGS &KEY START END VALUE FROM-END COLLECT (VALUE NIL VALUE-SET-P) &ALLOW-OTHER-KEYS)

Map-index is like map-btree but for secondary indices, it takes a function of three arguments: key, value and primary key. As with map-btree the keyword arguments start and end determine the starting element and ending element, inclusive. Also, start = nil implies the first element, end = nil implies the last element in the index. If you want to traverse only a set of identical key values, for example all nil values, then use the value keyword which will override any values of start and end. The collect keyword will accumulate the results from each call of fn in a fresh list and return that list in the same order the calls were made (first to last)

MAP-INDICES (FN BT)

Calls a two input function with the name and btree-index object of all secondary indices in the btree

MAP-PSET (FN PSET)

Map operator for psets

MAP-SLOT-SET (FN SLOT-SET)

Map operator for psets

MIGRATE (DST SRC)

Migrate an object from the src object, collection or controller to the dst controller. Returns a copy of the object in the new store so you can drop it into a parent object or the root of the dst controller

OPTIMIZE-LAYOUT (SC &ALLOW-OTHER-KEYS)

If supported, speed up the index and allocation by freeing up any available storage and return it to the free list. See the methods of data stores to determine what options are valid. Supported both on stores (all btrees and persistent slots) and specific btrees

PSET-LIST (PSET)

Convert items of pset into a list for processing

REMOVE-INDEX (BT INDEX-NAME)

Remove a named index.

REMOVE-ITEM (ITEM PSET)

Remove specified item from pset

REMOVE-KV (KEY BT)

Remove a key / value pair from a BTree.

SLOT-SET-LIST (SLOT-SET)

Convert items of pset into a list for processing

STOP-AND-COPY-GC (SC &KEY TARGET MAPSPEC REPLACE-SOURCE DELETE-SOURCE BACKUP &ALLOW-OTHER-KEYS)

Wrap all the migrate machinery in a simple top-level gc call. This will copy all the data in the source store to the target store. Accesses to the store should be inhibited by the user. mapspec saves on memory space by storing oid->object maps on disk replace-source means to have the resulting spec be the same as the source using copy-spec. delete-source means do not keep a backup backup means to make a backup with a name derived from the src

STRUCT-CONSTRUCTOR (CLASS)

Called to get the constructor name for a struct class. Users should overload this when they want to serialize non-standard constructor names. The default constructor make-xxx will work by default. The argument is an eql style type: i.e. of type (eql 'my-struct)

UPGRADE (SC SPEC)

Given an open store controller from a prior version, open a new store specified by spec and migrate the data from the original store to the new one, upgrading it to the latest version

Undocumented

BTREE-DIFFER-P (X Y)

CACHEABLE-CLASS (CLASS)

CACHING-STYLE (CLASS)

SETFCACHING-STYLE (STYLE CLASS)

EMPTY-BTREE-P (BTREE)

FIND-INVERTED-INDEX (CLASS SLOT &KEY (SC *STORE-CONTROLLER*) (NULL-ON-FAIL NIL))

FLUSH-INSTANCE-CACHE (SC)

PERSISTENT-CHECKED-OUT-P (OBJECT)

PERSISTENT-CHECKIN (OBJECT)

PERSISTENT-CHECKOUT (OBJECT)

PERSISTENT-CHECKOUT-CANCEL (OBJECT)

PERSISTENT-SYNC (OBJECT)

REBUILD-SLOT-INDEX (SC CLASS-NAME INDEX-NAME)

REMOVE-KV-PAIR (KEY VALUE DBT)

Private

BUILD-BTREE (SC)

Construct a btree of the appropriate type corresponding to this store-controller.

BUILD-BTREE-INDEX (SC &KEY NAME PRIMARY KEY-FORM)

Construct a btree of the appropriate type corresponding to this store-controller.

BUILD-DUP-BTREE (SC)

Construct a btree of the appropriate type corresponding to this store-controller.

BUILD-INDEXED-BTREE (SC)

Construct a btree of the appropriate type corresponding to this store-controller.

BUILD-PSET (SC)

Construct an empty default pset or backend specific pset. This is an internal function used by make-pset

BUILD-SLOT-SET (SC)

Construct an empty default pset or backend specific pset. This is an internal function used by make-pset

CLOSE-CONTROLLER (SC)

Close the db handles and environment. Should be in a state where lisp could be shut down without causing an inconsistent state in the db. Also, the object could be used by open-controller to reopen the database

CONNECTION-IS-INDEED-OPEN (CONTROLLER)

Validate the controller and the db that it is connected to

COPY-SPEC (TYPE SRC TARG)

Copy files associated with spec from src to targ

DATABASE-VERSION (SC)

Data stores implement this to store the serializer version. The protocol requires that data stores report their database version. On new database creation, the database is written with the *elephant-code-version* so that is returned by database-version. If a legacy database does not have a version according to the method then it should return nil

DEFAULT-CLASS-ID (BASE-TYPE SC)

A method implemented by the store controller for providing fixed class ids for basic btree derivative types

DEFAULT-CLASS-ID-TYPE (ID SC)

A method implemented by the store controller which provides the type associated with a default id or nil if the id does not match

DELETE-SPEC (TYPE SPEC)

Delete the storage associated with spec

EXECUTE-TRANSACTION (STORE-CONTROLLER TXN-FN &REST REST &KEY &ALLOW-OTHER-KEYS)

This is an interface to the backend's transaction function. The body should be executed in a dynamic environment that protects against non-local exist, provides ACID properties for DB operations within the body and properly binds any relevant parameters.

GET-CON (INSTANCE)

This is used to find and validate the connection spec maintained for in-memory persistent objects. Should we re-open the controller from the spec if it's not cached? That might be dangerous so for now we error

NEXT-CID (SC)

Provides a unique class schema id's

NEXT-OID (SC)

Provides a persistent source of unique id's

OPEN-CONTROLLER (SC &KEY RECOVER RECOVER-FATAL THREAD &ALLOW-OTHER-KEYS)

Opens the underlying environment and all the necessary database tables. Different data stores may use different keys so all methods should &allow-other-keys. There are three standard keywords: :recover, :recover-fatal and :thread. Recover means that recovery should be checked for or performed on startup. Recover fatal means a full rebuild from log files is requested. Thread merely indicates to the data store that it is a threaded application and any steps that need to be taken (for example transaction implementation) are taken. :thread is usually true.

PERSISTENT-SLOT-BOUNDP (SC INSTANCE NAME)

Data store specific slot bound test function

PERSISTENT-SLOT-MAKUNBOUND (SC INSTANCE NAME)

Data store specific slot makunbound handler

PERSISTENT-SLOT-READER (SC INSTANCE NAME &OPTIONAL OIDS-ONLY)

Data store specific slot reader function

PERSISTENT-SLOT-WRITER (SC NEW-VALUE INSTANCE NAME)

Data store specific slot writer function

RESERVED-OID-P (SC OID)

Is this OID reserved by the controller? GC doesn't touch

TEMP-SPEC (TYPE SPEC)

Create a temporary specification with source spec as hint

WALK-HEAP (OBJ)

Treat heap objects like a tree and walk over aggregate objects to leaf elements (persistent objects and scalara values)

Undocumented

ADD-CLASS-CONTROLLER-SCHEMA (SC CLASS SCHEMA)

ADD-SLOT-DEF-INDEX (IDX DEF SC)

ADD-SLOT-INDEX (SC NEW-INDEX CLASS-NAME INDEX-NAME)

CACHE-INSTANCE (SC OBJ)

CHANGE-DB-INSTANCE (CURRENT PREVIOUS NEW-SCHEMA OLD-SCHEMA)

CHANGE-INSTANCE-SLOT (SC CURRENT PREVIOUS TYPE RECS)

SETFCLASS-DIRECT-SLOTS (NEW-VALUE SLOT-CLASS)

CLASS-INDEXING-ENABLED-P (CLASS)

CLASS-SLOT-CELLS (CLASS)

SETFCLASS-SLOT-CELLS (NEW-VALUE CLASS)

SETFCLASS-SLOTS (NEW-VALUE SLOT-CLASS)

CLEAR-SLOT-DEF-INDEX (DEF SC)

COMPUTE-CLASS-PRECEDENCE-LIST (ROOT)

COMPUTE-EFFECTIVE-SLOT-DEFINITION (CLASS NAME DSLOTDS)

COMPUTE-EFFECTIVE-SLOT-DEFINITION-INITARGS (CLASS DIRECT-SLOTDS)

COMPUTE-SLOT-RECS-BY-TYPE (TYPE SLOT-DEF-TYPE CLASS-OBJ)

COMPUTE-SLOTS (CLASS)

CONTROLLER-PROPERTIES (SC)

CONTROLLER-RECREATE-INSTANCE (SC OID &OPTIONAL CLASSNAME)

COPY-BTREE-CONTENTS (SC DST SRC)

CREATE-CONTROLLER-SCHEMA (SC CLASS)

CROSS-REFERENCE-ERROR-FOREIGN-CONTROLLER (CONDITION)

SETFCROSS-REFERENCE-ERROR-FOREIGN-CONTROLLER (NEW-VALUE CONDITION)

CROSS-REFERENCE-ERROR-HOME-CONTROLLER (CONDITION)

SETFCROSS-REFERENCE-ERROR-HOME-CONTROLLER (NEW-VALUE CONDITION)

CROSS-REFERENCE-ERROR-OBJECT (CONDITION)

SETFCROSS-REFERENCE-ERROR-OBJECT (NEW-VALUE CONDITION)

DATABASE-ALLOCATION-P (CLASS)

DEFAULT-CLASS-CONSTRUCTOR (SCHEMA &REST ARGS &KEY SUPERCLASSES &ALLOW-OTHER-KEYS)

DERIVED-INDEX-SLOT-DEFS (CLASS)

DERIVED-INDEX-SLOT-NAMES (CLASS)

DESERIALIZATION-ERROR-CONDITION (CONDITION)

SETFDESERIALIZATION-ERROR-CONDITION (NEW-VALUE CONDITION)

DIRECT-SLOT-DEFINITION-CLASS (CLASS &REST INITARGS)

DROP-SLOT-INDEX (SC CLASS-NAME INDEX-NAME)

EFFECTIVE-SLOT-DEFINITION-CLASS (CLASS &REST INITARGS)

ENSURE-CLASS-USING-CLASS (CLASS NAME &REST ARGS &ALLOW-OTHER-KEYS)

ENSURE-INDEX (IBT IDXNAME &KEY KEY-FORM POPULATE)

ENSURE-SCHEMAS (INSTANCE)

FINALIZE-INHERITANCE (CLASS)

FIND-SLOT-DEF-NAMES-BY-TYPE (CLASS TYPE &OPTIONAL (BY-SUBTYPE))

FIND-SLOT-DEFS-BY-TYPE (CLASS TYPE &OPTIONAL (BY-SUBTYPE))

GC-OPEN-TARGET (SPEC)

GET-CACHE-STYLE (PM)

GET-CACHED-INSTANCE (SC OID)

GET-CLASS-CONTROLLER-SCHEMA (SC CLASS)

GET-CLASS-INDEXING (PM)

GET-CLASS-SCHEMA (PM)

GET-CONTROLLER-SCHEMA (SC SCHEMA-ID &OPTIONAL CLASS)

GET-ELE-PROPERTY (PROPERTY &KEY (SC *STORE-CONTROLLER*))

GET-INSTANCE-CLASS (SC OID &OPTIONAL CLASSNAME)

GET-SCHEMA-ID-CLASS (SC CID)

GET-SLOT-DEF-INDEX (DEF SC)

GET-STORE-SCHEMAS (PM)

HAS-CLASS-CONTROLLER-SCHEMA-P (SC CLASS)

HAS-CLASS-SCHEMA-P (CLASS)

INDEXED-SLOT-DEFS (CLASS)

INDEXED-SLOT-NAMES (CLASS)

INITIALIZE-INTERNAL-SLOT-FUNCTIONS (SLOTD)

INITIALIZE-SERIALIZER (SC)

KEY-FORM-OF (CONDITION)

LOOKUP-SCHEMA (SC CLASS)

MATCH-SCHEMAS (SCH1 SCH2)

MAYBE-PERSISTENT-SYNC (INSTANCE)

MISSING-PERSISTENT-INSTANCE-OID (CONDITION)

SETFMISSING-PERSISTENT-INSTANCE-OID (NEW-VALUE CONDITION)

MISSING-PERSISTENT-INSTANCE-SPEC (CONDITION)

SETFMISSING-PERSISTENT-INSTANCE-SPEC (NEW-VALUE CONDITION)

OID->SCHEMA-ID (OID SC)

PERSISTENT-P (MCLASS)

PERSISTENT-SLOT-DROP-CLASS (CONDITION)

PERSISTENT-SLOT-DROP-NAMES (CONDITION)

PERSISTENT-SLOT-DROP-OPERATION (CONDITION)

RECREATE-INSTANCE (INSTANCE &REST INITARGS &KEY SCHEMA (SC *STORE-CONTROLLER*) FROM-OID &ALLOW-OTHER-KEYS)

RECREATE-INSTANCE-USING-CLASS (CLASS &REST INITARGS &ALLOW-OTHER-KEYS)

REGISTER-INSTANCE (SC CL INSTANCE)

REMOVE-CLASS-CONTROLLER-SCHEMA (SC CLASS)

REMOVE-CONTROLLER-SCHEMA (SC SCHEMA-ID)

RETRY-COUNT (CONDITION)

SETFRETRY-COUNT (NEW-VALUE CONDITION)

SCHEMA-DIFF (NEW OLD)

SET-CLASS-SCHEMA (PM VALUE)

SET-CONTROLLER-SCHEMA (SC SCHEMA-ID DB-SCHEMA)

SET-ELE-PROPERTY (PROPERTY VALUE &KEY (SC *STORE-CONTROLLER*))

SET-INSTANCE-SCHEMA-ID (SC OID CID)

SET-STORE-SCHEMAS (PM VALUE)

SLOT-BOUNDP-USING-CLASS (CLASS OBJECT SLOTD)

SLOT-MAKUNBOUND-USING-CLASS (CLASS OBJECT SLOTD)

SLOT-VALUE-USING-CLASS (CLASS OBJECT SLOTD)

SETFSLOT-VALUE-USING-CLASS (NEW-VALUE CLASS OBJECT SLOTD)

STORE-CONTROLLER-CLOSED-ERROR-OBJECT (CONDITION)

SETFSTORE-CONTROLLER-CLOSED-ERROR-OBJECT (NEW-VALUE CONDITION)

STORE-CONTROLLER-CLOSED-ERROR-SPEC (CONDITION)

SETFSTORE-CONTROLLER-CLOSED-ERROR-SPEC (NEW-VALUE CONDITION)

SYNCHRONIZE-STORE-CLASS (SC CLASS CLASS-SCHEMA OLD-SCHEMA)

SYNCHRONIZE-STORE-CLASSES (SC &KEY CLASS-LIST)

SYNCHRONIZE-STORES-FOR-CLASS (CLASS)

TRANSIENT-P (SLOT)

TYPE-DESERIALIZATION-ERROR-TAG (CONDITION)

SETFTYPE-DESERIALIZATION-ERROR-TAG (NEW-VALUE CONDITION)

UNCACHE-CONTROLLER-SCHEMA (SC SCHEMA-ID)

UNCACHE-INSTANCE (SC OID)

UP-TO-DATE-P (SC)

UPDATE-CONTROLLER-SCHEMA (SC DB-SCHEMA &OPTIONAL UPDATE-CACHE)

UPGRADABLE-P (SC)

UPGRADE-ALL-DB-INSTANCES (SC CLASS-SCHEMA)

UPGRADE-ALL-MEMORY-INSTANCES (SC)

UPGRADE-CLASS-SLOT (SC CLASS DIFF-TYPE RECS)

UPGRADE-DB-INSTANCE (INSTANCE NEW-SCHEMA OLD-SCHEMA OLD-VALUES)

UPGRADE-INSTANCE-SLOT (SC INSTANCE TYPE RECS OLD-VALUES)

VALIDATE-SUPERCLASS (CLASS SUPERCLASS)

WALK-BTREE (OBJ)

SLOT-ACCESSOR

Public

CONTROLLER-ROOT (OBJECT)

This is an instance of the data store persistent btree. It should have an OID that is fixed in the code and does not change between sessions. Usually it this is something like 0, 1 or -1

CURSOR-INITIALIZED-P (OBJECT)

Predicate indicating whether the btree in question is initialized or not. Initialized means that the cursor has a legitimate position, not that any initialization action has been taken. The implementors of this abstract class should make sure that happens under the sheets... Cursors are initialized when you invoke an operation that sets them to something (such as cursor-first), and are uninitialized if you move them in such a way that they no longer have a legimtimate value.

SETFCURSOR-INITIALIZED-P (NEW-VALUE OBJECT)

Predicate indicating whether the btree in question is initialized or not. Initialized means that the cursor has a legitimate position, not that any initialization action has been taken. The implementors of this abstract class should make sure that happens under the sheets... Cursors are initialized when you invoke an operation that sets them to something (such as cursor-first), and are uninitialized if you move them in such a way that they no longer have a legimtimate value.

Undocumented

KEY-FN (OBJECT)

SETFKEY-FN (NEW-VALUE OBJECT)

KEY-FORM (OBJECT)

PRIMARY (OBJECT)

Private

%CLASS-SCHEMA (OBJECT)

The code master schema

SETF%CLASS-SCHEMA (NEW-VALUE OBJECT)

The code master schema

ASSOCIATION-SLOT-BASE (OBJECT)

The base class to use as an index

SETFASSOCIATION-SLOT-BASE (NEW-VALUE OBJECT)

The base class to use as an index

ASSOCIATION-SLOT-INDICES (OBJECT)

Alist of actual indices by store

SETFASSOCIATION-SLOT-INDICES (NEW-VALUE OBJECT)

Alist of actual indices by store

CONTROLLER-DESERIALIZE (OBJECT)

Contains the entry point for the specific serializer to be called by elephant::deserialize

SETFCONTROLLER-DESERIALIZE (NEW-VALUE OBJECT)

Contains the entry point for the specific serializer to be called by elephant::deserialize

CONTROLLER-DESERIALIZE-FN (OBJECT)

Contains the entry point for the specific serializer to be called by elephant::deserialize

SETFCONTROLLER-DESERIALIZE-FN (NEW-VALUE OBJECT)

Contains the entry point for the specific serializer to be called by elephant::deserialize

CONTROLLER-INDEX-TABLE (OBJECT)

This is another root for class indexing that is also a data store specific persistent btree instance with a unique OID that persists between sessions. No cache is needed because we cache in the class slots.

CONTROLLER-INSTANCE-CACHE (OBJECT)

This is an instance cache and part of the metaclass protocol. Data stores should not override the default behavior.

SETFCONTROLLER-INSTANCE-CACHE (NEW-VALUE OBJECT)

This is an instance cache and part of the metaclass protocol. Data stores should not override the default behavior.

CONTROLLER-INSTANCE-CACHE-LOCK (OBJECT)

Protection for updates to the cache from multiple threads. Do not override.

SETFCONTROLLER-INSTANCE-CACHE-LOCK (NEW-VALUE OBJECT)

Protection for updates to the cache from multiple threads. Do not override.

CONTROLLER-INSTANCE-CLASS-INDEX (OBJECT)

A reverse map of class id to oid

CONTROLLER-INSTANCE-TABLE (OBJECT)

Contains btree of oid to class ids

CONTROLLER-MARK-LIST (OBJECT)

During a mark pass, we need to mark any objects we write to the store. This maintains a local cache so we don't do redundant writes and increase contention

SETFCONTROLLER-MARK-LIST (NEW-VALUE OBJECT)

During a mark pass, we need to mark any objects we write to the store. This maintains a local cache so we don't do redundant writes and increase contention

CONTROLLER-MARK-TABLE (OBJECT)

This keeps track of the mark table used by the GC during the GC run

SETFCONTROLLER-MARK-TABLE (NEW-VALUE OBJECT)

This keeps track of the mark table used by the GC during the GC run

CONTROLLER-MARKING-P (OBJECT)

Used by the online GC to keep track of whether we're in the mark phase of a mark and sweep pass

SETFCONTROLLER-MARKING-P (NEW-VALUE OBJECT)

Used by the online GC to keep track of whether we're in the mark phase of a mark and sweep pass

CONTROLLER-MAX-OID (OBJECT)

We conservatively mark any oid created after the GC mark pass starts

SETFCONTROLLER-MAX-OID (NEW-VALUE OBJECT)

We conservatively mark any oid created after the GC mark pass starts

CONTROLLER-OPENING-ARGS (OBJECT)

List of keyword arguments passed to the OPEN-STORE function when opening (or re-opening) a controller.

SETFCONTROLLER-OPENING-ARGS (NEW-VALUE OBJECT)

List of keyword arguments passed to the OPEN-STORE function when opening (or re-opening) a controller.

CONTROLLER-SCHEMA-CACHE (OBJECT)

This is a cache of class schemas stored in the database indexed by classid

SETFCONTROLLER-SCHEMA-CACHE (NEW-VALUE OBJECT)

This is a cache of class schemas stored in the database indexed by classid

CONTROLLER-SCHEMA-CACHE-LOCK (OBJECT)

Protection for updates to the cache from multiple threads. Do not override.

SETFCONTROLLER-SCHEMA-CACHE-LOCK (NEW-VALUE OBJECT)

Protection for updates to the cache from multiple threads. Do not override.

CONTROLLER-SCHEMA-CLASSES (OBJECT)

Maintains a list of all classes that have a cached schema value so we can shutdown cleanly

SETFCONTROLLER-SCHEMA-CLASSES (NEW-VALUE OBJECT)

Maintains a list of all classes that have a cached schema value so we can shutdown cleanly

CONTROLLER-SCHEMA-NAME-INDEX (OBJECT)

Schema name to schema database table

CONTROLLER-SCHEMA-TABLE (OBJECT)

Schema id to schema database table

CONTROLLER-SERIALIZE (OBJECT)

Accessed by elephant::serialize to get the entry point to the default serializer or to a data store specific serializer

SETFCONTROLLER-SERIALIZE (NEW-VALUE OBJECT)

Accessed by elephant::serialize to get the entry point to the default serializer or to a data store specific serializer

CONTROLLER-SERIALIZE-FN (OBJECT)

Accessed by elephant::serialize to get the entry point to the default serializer or to a data store specific serializer

SETFCONTROLLER-SERIALIZE-FN (NEW-VALUE OBJECT)

Accessed by elephant::serialize to get the entry point to the default serializer or to a data store specific serializer

CONTROLLER-SERIALIZER-VERSION (OBJECT)

Governs the default behavior regarding which serializer version the current elephant core is using. Data stores can override by creating a method on initialize-serializer.

SETFCONTROLLER-SERIALIZER-VERSION (NEW-VALUE OBJECT)

Governs the default behavior regarding which serializer version the current elephant core is using. Data stores can override by creating a method on initialize-serializer.

CONTROLLER-SPEC (OBJECT)

Data store initialization functions are expected to initialize :spec on the call to make-instance

SETFCONTROLLER-SPEC (NEW-VALUE OBJECT)

Data store initialization functions are expected to initialize :spec on the call to make-instance

DB-SPEC (OBJECT)

Persistent objects use a spec pointer to identify which store they are connected to

SETFDB-SPEC (NEW-VALUE OBJECT)

Persistent objects use a spec pointer to identify which store they are connected to

FOREIGN-CLASS (OBJECT)

Direct pointer to foreign class; late binding

SETFFOREIGN-CLASS (NEW-VALUE OBJECT)

Direct pointer to foreign class; late binding

INDEXED-SLOT-BASE (OBJECT)

The base class to use as an index

SETFINDEXED-SLOT-BASE (NEW-VALUE OBJECT)

The base class to use as an index

INDEXED-SLOT-INDICES (OBJECT)

Alist of actual indices by store

SETFINDEXED-SLOT-INDICES (NEW-VALUE OBJECT)

Alist of actual indices by store

OID (OBJECT)

All persistent objects have an oid

SETFOID (NEW-VALUE OBJECT)

All persistent objects have an oid

SCHEMA-UPGRADE-FN (OBJECT)

A form or functionname that is to be called when upgrading from the prior version to the current

SETFSCHEMA-UPGRADE-FN (NEW-VALUE OBJECT)

A form or functionname that is to be called when upgrading from the prior version to the current

SCHEMA-VERSION (OBJECT)

Keep track of changes to schemas classes without having a recursive schema problem so we can run an upgrade over the schema DB when necessary

SETFSCHEMA-VERSION (NEW-VALUE OBJECT)

Keep track of changes to schemas classes without having a recursive schema problem so we can run an upgrade over the schema DB when necessary

Undocumented

%CACHE-STYLE (OBJECT)

SETF%CACHE-STYLE (NEW-VALUE OBJECT)

%CLASS-INDEXING (OBJECT)

SETF%CLASS-INDEXING (NEW-VALUE OBJECT)

%SLOTS-WERE-RECOMPUTED-P (OBJECT)

SETF%SLOTS-WERE-RECOMPUTED-P (NEW-VALUE OBJECT)

%STORE-SCHEMAS (OBJECT)

SETF%STORE-SCHEMAS (NEW-VALUE OBJECT)

ASSOCIATION (OBJECT)

SETFASSOCIATION (NEW-VALUE OBJECT)

ASSOCIATION-TYPE (OBJECT)

SETFASSOCIATION-TYPE (NEW-VALUE OBJECT)

CACHED-SLOT-P (OBJECT)

SETFCACHED-SLOT-P (NEW-VALUE OBJECT)

CHECKED-OUT-P (OBJECT)

SETFCHECKED-OUT-P (NEW-VALUE OBJECT)

CLASS-DIRECT-SLOTS (CLASS)

CLASS-DIRECT-SUBCLASSES (CLASS)

CLASS-DIRECT-SUPERCLASSES (CLASS)

CLASS-FINALIZED-P (CLASS)

CLASS-PRECEDENCE-LIST (PCL-CLASS)

CLASS-SLOTS (CLASS)

CONTROLLER-DATABASE-VERSION (OBJECT)

SETFCONTROLLER-DATABASE-VERSION (NEW-VALUE OBJECT)

CURSOR-BTREE (OBJECT)

SETFCURSOR-BTREE (NEW-VALUE OBJECT)

CURSOR-OID (OBJECT)

SETFCURSOR-OID (NEW-VALUE OBJECT)

DERIVED-FN (OBJECT)

SETFDERIVED-FN (NEW-VALUE OBJECT)

DERIVED-FN-REF (OBJECT)

SETFDERIVED-FN-REF (NEW-VALUE OBJECT)

DERIVED-SLOT-DEPS (OBJECT)

SETFDERIVED-SLOT-DEPS (NEW-VALUE OBJECT)

DERIVED-SLOT-TRIGGERS (OBJECT)

SETFDERIVED-SLOT-TRIGGERS (NEW-VALUE OBJECT)

FOREIGN-CLASSNAME (OBJECT)

SETFFOREIGN-CLASSNAME (NEW-VALUE OBJECT)

FOREIGN-SLOTNAME (OBJECT)

SETFFOREIGN-SLOTNAME (NEW-VALUE OBJECT)

INDEXED-P (OBJECT)

SETFINDEXED-P (NEW-VALUE OBJECT)

INHERIT-P (OBJECT)

SETFINHERIT-P (NEW-VALUE OBJECT)

MANY-TO-MANY-P (OBJECT)

SETFMANY-TO-MANY-P (NEW-VALUE OBJECT)

PCHECKED-OUT-P (OBJECT)

SETFPCHECKED-OUT-P (NEW-VALUE OBJECT)

PSET-BTREE (OBJECT)

SETFPSET-BTREE (NEW-VALUE OBJECT)

SCHEMA-CLASSNAME (OBJECT)

SETFSCHEMA-CLASSNAME (NEW-VALUE OBJECT)

SCHEMA-ID (OBJECT)

SETFSCHEMA-ID (NEW-VALUE OBJECT)

SCHEMA-PREDECESSOR (OBJECT)

SETFSCHEMA-PREDECESSOR (NEW-VALUE OBJECT)

SCHEMA-SLOT-RECS (OBJECT)

SETFSCHEMA-SLOT-RECS (NEW-VALUE OBJECT)

SCHEMA-SUCCESSOR (OBJECT)

SETFSCHEMA-SUCCESSOR (NEW-VALUE OBJECT)

SCHEMA-UPGRADED-P (OBJECT)

SETFSCHEMA-UPGRADED-P (NEW-VALUE OBJECT)

SET-VALUED-P (OBJECT)

SETFSET-VALUED-P (NEW-VALUE OBJECT)

SLOT-DEFINITION-ALLOCATION (SLOTD)

SETFSLOT-DEFINITION-ALLOCATION (NEW-VALUE STANDARD-SLOT-DEFINITION)

SLOT-DEFINITION-ALLOCATION-CLASS (STANDARD-SLOT-DEFINITION)

SETFSLOT-DEFINITION-ALLOCATION-CLASS (NEW-VALUE STANDARD-SLOT-DEFINITION)

SLOT-DEFINITION-INITARGS (SLOT-DEFINITION)

SETFSLOT-DEFINITION-INITARGS (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-INITFORM (SLOT-DEFINITION)

SETFSLOT-DEFINITION-INITFORM (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-INITFUNCTION (SLOT-DEFINITION)

SETFSLOT-DEFINITION-INITFUNCTION (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-NAME (SLOT-DEFINITION)

SETFSLOT-DEFINITION-NAME (NEW-VALUE SLOT-DEFINITION)

VARIABLE

Public

*DEFAULT-RETRIES*

The number of times the with-transaction macros should retry a transaction before the expression passes the error up the stack

*STORE-CONTROLLER*

The store controller which persistent objects talk to.

*WARN-ON-MANUAL-CLASS-FINALIZATION*

Issue a printed warnings when the class mechanism has to finalize a class to access indexing information

*WARN-WHEN-DROPPING-PERSISTENT-SLOTS*

Signal a continuable error when the user is about to delete a bunch of persistent slot values on class redefinition. This is nil by default to stop annoying message and confusing new users, but it will help keep users from shooting themselves in the foot and losing significant amounts of data during debugging and development. It can be disabled if change-class is used a bunch in the application rather than just defclass changes interactively. Note that the new class definition will take place even if you abort the continuable error; only the removal of the slots in the database is prevented. You can access them again if you redefine your class once more.

Undocumented

*ALWAYS-CONVERT*

*INHIBIT-SLOT-COPY*

Private

*BERKELEY-DB-CACHESIZE*

This parameter controls the size of the berkeley db data store page cache. This parameter can be increased by to 4GB on 32-bit machines and much larger on other machines. Using the db_stat utility to identify cache hit frequency on your application is a good way to tune this number. The default is 20 megabytes specified in bytes. If you need to specify Gigbyte + cache sizes, talk to the developers! This is ignored for existing databases that were created with different parameters

*BERKELEY-DB-MAX-LOCKS*

Controls the number of locks allocated for berkeley db. It helps to increase it to enable transactions to be larger. Typically for bulk loads or large transactions.

*BERKELEY-DB-MAX-OBJECTS*

Controls the number of locks allocated for berkeley db. It helps to increase it to enable transactions to be larger. Typically for bulk loads or large transactions. See berkeley db docs 'Configuring Locking: sizing the system' for more detail

*BERKELEY-DB-MAX-TRANSACTIONS*

Controls the number of transactions allocated for berkeley db. Especially MVCC operation (see below) requires a large number of transactions.

*CACHED-INSTANCE-DEFAULT-MODE*

Determines the global default for cache mode on instances. Override with instance initarg :cache-mode

*CIRCULARITY-INITIAL-HASH-SIZE*

This is the default size of the circularity cache used in the serializer

*CURRENT-CURSOR*

This dynamic variable is referenced only when deleting elements using the following function. This allows mapping functions to delete elements as they map. This is safe as we don't revisit values during maps

*CURRENT-TRANSACTION*

The transaction which is currently in effect.

*DEFAULT-MVCC*

Determines whether a BDB database is enabled for multiple version concurrency controller (DB_MULTIVERSION) and transactions are DB_SNAPSHOT by default. These can be overridden on a per-transaction basis using the :mvcc argument to open-store and :snapshot to with-transaction.

*DROP-INSTANCE-SEMANTICS*

Bound when dropping an instances, relaxes constraints etc.

*ELEPHANT-CODE-VERSION*

The current database version supported by the code base

*ELEPHANT-CODE-VERSION-INT*

The current database version supported by the code base

*ELEPHANT-DATA-STORES*

Tells the main elephant code the tag used in a store spec to refer to a given data store. The second argument is an asdf dependency list. Entries have the form of (data-store-type-tag asdf-depends-list

*ELEPHANT-PROPERTIES-LABEL*

This is the symbol used to store properties associated with the database in the controller-root through the new properties interface. Users attempting to directly write this variable will run into an error

*ELEPHANT-UNMARKED-CODE-VERSION*

If a database is opened with existing data but no version then we assume it's version 0.6.0

*ENABLE-MULTI-STORE-INDEXING*

Allow indexed class instances to reside in more than one data store. Inhibits various checks and errors and allows the class to cache multiple index controllers. Set by a user configurable parameter.

*LAZY-DB-INSTANCE-UPGRADING*

Only upgrade instances when loaded. This may require a chain of transformations and delay reclimation of space, but it amortizes upgrade costs over time. Not compatible with valid, up-to-date indices!

*LAZY-MEMORY-INSTANCE-UPGRADING*

Walk through a given store's memory cache on class redefinition by default. Setting this variable inhibits calling update-instance-for-redefined-class for any instances that have been invalidated by the MOP

*MAP-USING-DEGREE2*

This parameter enables an optimization for the Berkeley DB data store that allows a map operator to walk over a btree without locking all read data, it only locks written objects and the current object

*MIGRATE-MESSAGES*

Print information during migrate to update user on ongoing progress

*MIGRATE-VERBOSE*

Print more than a simple status line

*NO-DESERIALIZATION-PACKAGE-FOUND-ACTION*

Issue a warning when deserializing a symbol from a package that is not created.

*RESOURCED-BYTE-SPEC*

Byte specs on CMUCL, SBCL and Allegro are conses.

*RESTRICTED-PROPERTIES*

Properties that are not user manipulable

*RETURN-NULL-ON-MISSING-INSTANCE*

During instance recreation, references to missing instances simply return null instead of signaling an error

*SERIALIZER-INST-LIST*

A placeholder for serializers to push new objects to mark. Should be bound dynamically

*SERIALIZER-MARK-LIST*

A placeholder for serializers to push new oids to mark. Should be bound dynamically

Undocumented

*DBCONNECTION-LOCK*

*DBCONNECTION-SPEC*

*DEBUG-SI*

*ELEPHANT-CONTROLLER-INIT*

*ELEPHANT-UPGRADE-TABLE*

*GENERIC-RELATION-FUNCTIONS*

*LEGACY-PACKAGE-CONVERSIONS*

*LEGACY-SYMBOL-CONVERSIONS*

*NUMBER-RELATION-FUNCTIONS*

*OID-BTREE*

*OID-HASH*

*OID-SPEC*

*OID-STORE*

*SLOT-DEF-TYPE-TAGS*

*STRING-RELATION-FUNCTIONS*

*USER-CONFIGURABLE-PARAMETERS*

ARRAY-TYPE-TO-BYTE

BYTE-TO-ARRAY-TYPE

COMPARISON-2OPS

CLASS

Public

BTREE

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

BTREE-INDEX

Secondary index to an indexed-btree.

CURSOR

A cursor for traversing (primary) BTrees.

INDEXED-BTREE

A BTree which supports secondary indices.

PERSISTENT

Abstract superclass for all persistent classes (common to both user-defined classes and Elephant-defined objects such as collections.)

PERSISTENT-COLLECTION

Abstract superclass of all collection types.

PERSISTENT-METACLASS

Metaclass for persistent classes. Use this metaclass to define persistent classes. All slots are persistent by default; use the :transient flag otherwise. Slots can also be indexed for by-value retrieval.

PERSISTENT-OBJECT

Superclass for all user-defined persistent classes. This is automatically inherited if you use the persistent-metaclass metaclass. This allows specialization of functions for user objects that would not be appropriate for Elephant objects such as persistent collections

PSET

An unordered persistent collection of unique elements according to serializer equal comparison

SECONDARY-CURSOR

Cursor for traversing secondary indices.

SLOT-SET

A proxy object for a set stored in a slot.

STORE-CONTROLLER

Superclass for the data store controller, the main interface to any book-keeping, references to DB handles, the instance cache, btree table creation, counters, locks, the roots (for garbage collection,) et cetera. Behavior is shared between the superclass and subclasses. See slot documentation for details.

Undocumented

DUP-BTREE

Private

CACHEABLE-PERSISTENT-OBJECT

Adds a special value slot to store checkout state

DEFAULT-SLOT-SET

A default slot-set implementation

PSET-SLOT-SET

slot-set based on pset

SCHEMA

Keep a doubly linked list of schemas in the db

Undocumented

ASSOCIATION-DIRECT-SLOT-DEFINITION

ASSOCIATION-EFFECTIVE-SLOT-DEFINITION

ASSOCIATION-SLOT-DEFINITION

CACHED-DIRECT-SLOT-DEFINITION

CACHED-EFFECTIVE-SLOT-DEFINITION

CACHED-SLOT-DEFINITION

DB-SCHEMA

DEFAULT-PSET

DERIVED-INDEX-DIRECT-SLOT-DEFINITION

DERIVED-INDEX-EFFECTIVE-SLOT-DEFINITION

DERIVED-INDEX-SLOT-DEFINITION

INDEXED-DIRECT-SLOT-DEFINITION

INDEXED-EFFECTIVE-SLOT-DEFINITION

INDEXED-SLOT-DEFINITION

PERSISTENT-DIRECT-SLOT-DEFINITION

PERSISTENT-EFFECTIVE-SLOT-DEFINITION

PERSISTENT-SLOT-DEFINITION

SET-VALUED-DIRECT-SLOT-DEFINITION

SET-VALUED-EFFECTIVE-SLOT-DEFINITION

SET-VALUED-SLOT-DEFINITION

SLOT-REC

STANDARD-DIRECT-SLOT-DEFINITION

STANDARD-EFFECTIVE-SLOT-DEFINITION

STANDARD-SLOT-DEFINITION

TRANSIENT-DIRECT-SLOT-DEFINITION

TRANSIENT-EFFECTIVE-SLOT-DEFINITION

TRANSIENT-SLOT-DEFINITION

CONDITION

Public

CROSS-REFERENCE-ERROR

An error condition raised when an object is being written into a data store other than its home store

ELEPHANT-DESERIALIZATION-ERROR

A generalized deserialization error; something went wrong in deserialization that an application can test for explicitely. The enclosed condition is the actual error

ELEPHANT-TYPE-DESERIALIZATION-ERROR

This error is signaled when a tag is not recognized in the deserializer. This error is more specific than the generalized error condition and aids in diagnosis. This may be due to a mistake in counts in the serializer or a corruption of the source data

Undocumented

CONTROLLER-LOST-ERROR

DROPPING-PERSISTENT-SLOT-DATA

TRANSACTION-RETRY-COUNT-EXCEEDED

Private

Undocumented

INVALID-KEYFORM

MISSING-PERSISTENT-INSTANCE

CONSTANT

Private

+CHECKOUT+

An object can be checked out and all cached slots are manipulated entirely in memory. This provides protection only for writes. An object cannot be written without being checked out. If someone tries to check out an object that is checked out, an error is flagged. This enables critical sections to be defined to provide per-process isolation for short-term operations. For long term checkouts, the user will need to provide any needed thread isolation. It would be easy to add multiple-process isolation by maintaining an owned state in the in-memory object so a process knew it was the one that did the check out and any write operations would assert an error.

+NONE+

Cache specification is ignored

+SLOT-UNBOUND+

SBCL specific extentions to MOP: if this value is read from an instance using STANDARD-INSTANCE-ACCESS, the slot is unbound. Similarly, an :INSTANCE allocated slot can be made unbound by assigning this to it using (SETF STANDARD-INSTANCE-ACCESS). Value of +SLOT-UNBOUND+ is unspecified, and should not be relied to be of any particular type, but it is guaranteed to be suitable for EQ comparison.

+TXN+

Cache values for subsequent reads in a transaction. Writes are write-through so any indices get updated. This is an object-wide policy for all cached slot types

Undocumented

+ELEPHANT-SERIALIZER-VERSION+

+ELEPHANT-VERSION+

+RESERVED-DBINFO+