Cheshire3 Objects: Database

Description

A Database is a collection of Records and Indexes. It is responsable for maintaining and allowing access to its components, as well as metadata associated with the collections. It must be able to interpret a request, splitting it amongst its known resources and then recombine the values into a single response.

Implementations
API

Note: The Database API is still under review, but likely to remain as is
FunctionParametersReturnsDescription
__init__domNode, parentObject The constructer takes a DOM tree containing the configuration of the database and the object which the database should consider as its parent, normally a Server.
addRecordsession, record Function to call to ensure that a record is registered with the database. This will only do the registration, you have to call indexRecord to index it.
indexRecordsession, record Sends the record to all known indexes to process
retrievesession, resultset, startPosition, numberOfRecordslist of RecordGiven a result set of record pointers, fetch the actual records and return them
scansession, query, numberOfTerms, directionlist of term/record pointersGiven a query, resolve the index and return the raw information from it.
searchsession, queryresultsetGiven a query, process it and return a result set
sortsession, resultSets, sortKeysresultSetMerge the given sets and sort by the keys, returning a new resultset
indexRecordssession Index all records known
removeRecordsession, record Unregister the record, but do not delete it from the recordStore. Removes pointers from indexes.
explainsessionundefinedReturn some information about self. TBD.
connectsession Perform any routines required at a session start.
disconnectsession Perform any tidying routines at session end
authenticatesession Authenticate user with database.