Cheshire3 Object Model: Class Database

Module baseObjects :: Class Database

Class Database
source code

Object Tree:
           object --+    
                    |    
configParser.C3Object --+
                        |
                       Database
Known Subclasses:
database.SimpleDatabase

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.

Instance Methods

add_record(self, session, record)
Ensure that a record is registered with the database.
authenticate(self, session, user)
Authenticate user against database
begin_indexing(self, session)
Perform tasks before records are to be indexed
commit_indexing(self, session)
Perform tasks after records have been sent to indexes.
commit_metadata(self, session)
Ensure persistence of database metadata
connect(self, session)
Perform database specific session initialisation
disconnect(self, session)
Perform any database specific session tidying on completion
index_record(self, session, record)
Sends the record to all indexes registered with the database to be indexes
reindex(self, session)
Reindex all records registered with the database
remove_record(self, session, req)
Unregister the record.
scan(self, session, query, numReq, direction=">=")
Given a CQL query (single searchClause), resolve the index and return a section of the term list
search(self, session, query)
Given a CQL query, perform the query and return a resultSet
sort(self, session, resultSets, sortKeys)
Take one or more resultSets and sort/merge by sortKeys
unindex_record(self, session, record)
Sends the record to all indexes registered with the database to be removed/unindexed

Inherited from configParser.C3Object: __init__, auth_function, get_config, get_default, get_object, get_path, get_setting, log_function, unauth_function, unlog_function

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables

indexes  
protocolMaps  
recordStore  

Inherited from configParser.C3Object: configStore, defaults, functionLogger, id, name, objectType, objects, parent, paths, permissionHandlers, settings, subConfigs, unresolvedObjects

Inherited from object: __class__


Method Details

add_record(self, session, record)

source code 
Ensure that a record is registered with the database. This function does not ensure persistence of the record, not index it, just perform registration

authenticate(self, session, user)

source code 
Authenticate user against database

begin_indexing(self, session)

source code 
Perform tasks before records are to be indexed

commit_indexing(self, session)

source code 
Perform tasks after records have been sent to indexes. For example, commit any temporary data to IndexStores

commit_metadata(self, session)

source code 
Ensure persistence of database metadata

connect(self, session)

source code 
Perform database specific session initialisation

disconnect(self, session)

source code 
Perform any database specific session tidying on completion

index_record(self, session, record)

source code 
Sends the record to all indexes registered with the database to be indexes

reindex(self, session)

source code 
Reindex all records registered with the database

remove_record(self, session, req)

source code 
Unregister the record.

scan(self, session, query, numReq, direction=">=")

source code 
Given a CQL query (single searchClause), resolve the index and return a section of the term list

search(self, session, query)

source code 
Given a CQL query, perform the query and return a resultSet

sort(self, session, resultSets, sortKeys)

source code 
Take one or more resultSets and sort/merge by sortKeys

unindex_record(self, session, record)

source code 
Sends the record to all indexes registered with the database to be removed/unindexed

Class Variable Details

indexes

Value:
{}                                                                     
      

protocolMaps

Value:
{}                                                                     
      

recordStore

Value:
None