Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

OOF_simpleRecordBackend Class Reference
[OOFILE Implementation Classes]

#include <oofrecs.h>

Inheritance diagram for OOF_simpleRecordBackend:

Inheritance graph
[legend]
Collaboration diagram for OOF_simpleRecordBackend:

Collaboration graph
[legend]
List of all members.

Detailed Description

Main implementation parent for backends following the record-oriented model.

An SQL backend would be a sibling to this class. Implements all the non-indexed searches, sorts and iteration. Adding a new non-indexed backend is simply a matter of subclassing this and adding necessary IO methods.


OID generation

virtual oidT currentOID ()
virtual oidT oidOfRecord (unsigned long)

selection manipulation

virtual unsigned long recordNumber () const
virtual unsigned long recordNumberOfOID (oidT inOID)
 Implement dbTable::recordNumberOfOID.

virtual void selectAll ()
virtual void selectNone ()
virtual void invert ()
virtual void difference_with (const OOF_tableBackend *)
virtual void intersection_with (const OOF_tableBackend *)
virtual void union_with (const OOF_tableBackend *)
virtual void union_with_no_overlap (const OOF_tableBackend *)
virtual void difference_with (const dbSelection &)
virtual void intersection_with (const dbSelection &)
virtual void union_with (const dbSelection &)
virtual void union_with_no_overlap (const dbSelection &)

public search functions

virtual bool search (const dbQueryClause *qClause)
virtual unsigned long recordNumberMatching (const dbQueryClause *qClause, bool *outFoundIt=0) const
virtual bool checkDuplicate (const dbQueryClause *)
virtual bool searchSelection (const dbQueryClause *)
virtual bool searchEqual (const dbField *, const char *, bool matchEntireKey=true)
virtual bool searchEqual (const dbField *, const void *)
virtual bool searchSelContainsAnyDelimited (const dbField *schField, const char *schStr, char delim)
virtual bool searchSelContainsAnyOf (const dbField *schField, const char **schStrs, unsigned long count)
virtual bool searchSelContainsAllDelimited (const dbField *schField, const char *schStr, char delim)
virtual bool searchSelContainsAllOf (const dbField *schField, const char **schStrs, unsigned long count)
virtual bool loadRelatedContextJoiningFromTo (const dbField *, const dbField *)
 Implements relationships via searching.


field-level data access

virtual bool readBool (const dbField *) const
 Assumes bools stored as unsigned short, 0==false.

virtual short readShort (const dbField *) const
virtual long readLong (const dbField *) const
virtual double readDouble (const dbField *) const
virtual const char * readChars (const dbField *) const
virtual oofString readString (const dbField *) const
 Copy field data into a string.

virtual void writeBool (bool, const dbField *)
 Encode bool as short to be decoded by readBool.

virtual void writeShort (short, const dbField *)
virtual void writeLong (long, const dbField *)
virtual void writeDouble (double, const dbField *)
virtual void writeChars (const char *, long numChars, long maxLen, const dbField *, long startIndex=0)
virtual void writeBytes (const char *inBuf, long inLen, const dbField *inField)
virtual char * getByteWriteAddress (unsigned long, const dbField *)

recordwise access

virtual bool atFirst () const
virtual bool atLast () const
virtual bool atRelative (unsigned long) const
virtual void prev ()
virtual bool more () const
virtual unsigned long count () const
void gotoBOF ()

record-level data access

virtual void newRecord ()
 Sets up a new record ready to enter data On exit the state is: Selection state is aboutToDirty Selection Set record state to New Set dirty to false Clear buffer Append new record to selection.

virtual void saveRecord ()
 Save current main record and any cached dirty records.

virtual void unloadRecord ()
virtual void unloadCache ()
virtual void revertRecord ()
virtual void pack ()

sorting public interface

virtual void setSortOrder (dbSorter *adoptSorter)
virtual dbSortersorter () const
virtual void sortSelectionNow (fieldNumT)
virtual void sortSelectionInverseNow (fieldNumT)
virtual void sortSelectionNow (const dbSorter *)

reflective operators

virtual unsigned long fieldDataLen (const dbField *) const
virtual bool fieldIsDirty (fieldNumT) const
virtual bool isNewRecord () const
virtual unsigned int numIndexes () const
virtual unsigned int numFiles () const
virtual unsigned long blobPointerReferenceSize () const
virtual bool allSelected () const
virtual bool contains (oidT) const

getting & saving selections as lightweight objects

virtual dbSelection currentSelection () const
virtual dbSelection makeEmptySelection () const
virtual void setSelection (const dbSelection &)
virtual void setSelection (const OOF_Selection *)

selection of specific contexts

virtual bool selectJustOID (oidT)
virtual void selectJustCurrent ()

locking

virtual void lockRecord ()
virtual void unlockRecord ()

transactions

virtual void beginTransaction (short tMode)
virtual void abortTransaction (short rMode)
virtual void commitTransaction (short rMode)

record-level data access

virtual void deleteRecord ()=0
virtual void loadBlob (const dbBLOB *)=0
bool isDirty () const
void markDirty ()

reflective operators

void fieldHasDefaultCalculator (dbField *)
void fieldHasStoredCalculator (dbField *)
virtual unsigned long sequenceNumber () const=0
dbTabletable () const
dbFieldfield (fieldNumT) const

public search functions

virtual bool gotoRecord (unsigned long relativeNum)=0

Ken's wildcard header bits

enum  OOF_wctype {
  prefix, single, multiple, singlefinal,
  multiplefinal
}

high-level search redirectors

virtual bool SearchBinaryFieldToLiteral (const dbQueryBinary *)
virtual bool SearchTrinaryFieldToLiterals (const dbQueryTrinary *)
virtual bool SearchCombineSubclauses (const dbQueryBinaryCombo *, bool searchSel)
virtual bool SearchSelectionBinaryFieldToLiteral (const dbQueryBinary *)

Non-Indexed searches

bool SearchEqualNonIndexed (const dbField *, const char *, bool matchEntireKey=true)
bool SearchEqualNonIndexed (const dbField *, const void *)
bool SearchWordNonIndexed (const dbField *, const char *, bool startsWith=false)
bool SearchNotEqualNonIndexed (const dbField *, const char *, bool matchEntireKey=true)
bool SearchNotEqualNonIndexed (const dbField *, const void *)
bool SearchBetweenNonIndexed (const dbField *, const char *, const char *)
bool SearchBetweenNonIndexed (const dbField *, const void *, const void *)
bool SearchOutsideNonIndexed (const dbField *, const char *, const char *)
bool SearchOutsideNonIndexed (const dbField *, const void *, const void *)
bool SearchComparativeNonIndexed (const dbField *, const char *, dbQueryClause::BinaryQueryOps)
bool SearchComparativeNonIndexed (const dbField *, const void *, dbQueryClause::BinaryQueryOps)
bool SearchSelectionTrinaryFieldToLiterals (const dbQueryTrinary *)

Non-Indexed wildcard Searches

bool SearchEqualNonIndexedWildcard (const dbField *schField, const char *schStr, bool matchEntireKey=true)
bool SearchNotEqualNonIndexedWildcard (const dbField *schField, const char *schStr, bool matchEntireKey=true)

Sort implementations

void SortSelectionNow (const dbUlong *theFld)
void SortSelectionNow (const dbLong *theFld)
void SortSelectionNow (const dbUshort *theFld)
void SortSelectionNow (const dbShort *theFld)
void SortSelectionNow (const dbReal *theFld)
void SortSelectionNow (const dbChar *theFld)
void SortSelectionNow (const dbText *theFld)
void SortSelectionNow (const dbField *theFld, unsigned long fixedBinaryLength)
void SortSelectionInverseNow (const dbUlong *theFld)
void SortSelectionInverseNow (const dbLong *theFld)
void SortSelectionInverseNow (const dbUshort *theFld)
void SortSelectionInverseNow (const dbShort *theFld)
void SortSelectionInverseNow (const dbReal *theFld)
void SortSelectionInverseNow (const dbChar *theFld)
void SortSelectionInverseNow (const dbText *theFld)
void SortSelectionInverseNow (const dbField *theFld, unsigned long fixedBinaryLength)
void SubSort (const dbSorter *theSorter, const unsigned long level, unsigned long *theData, const unsigned long count)
 Now we're sorting at the recursive level of partitioning in a nested sort !


Public Types

enum  ERecordState { eNew, eLoaded, eUnloaded }

Public Member Functions

virtual ~OOF_simpleRecordBackend ()
virtual OOF_tableBackendclone (dbTable::selSharingT, dbTable *) const=0
virtual void buildSchema (bool rebuilding=false)
virtual void describeState (std::ostream &) const
virtual void setFileExtensions (const char *, const char *)
virtual void ignoreDuplicateRecords ()
virtual void noticeDuplicateRecords ()
virtual bool reloadRecord ()
virtual bool isRecordLoaded () const
virtual void setBlobLength (fieldNumT, unsigned long len)
virtual bool addOIDtoSelection (oidT)
virtual void dropRecordFromSelection (unsigned long)
void describeInvariant (std::ostream &) const
 debugging

virtual void addIndices (const char *newIDXname)=0
virtual void suppressIndices ()=0
virtual void rebuild ()=0
virtual void close ()=0
virtual void deleteStorage ()
virtual void createTableInConnection (const dbConnect *)=0
virtual bool openTableInConnection (const dbConnect *, const bool createIfMissing=false)=0
virtual void start ()=0
virtual void next ()=0
virtual unsigned long countAll () const=0
void copyFrom (const OOF_recordBufferedContext *)
virtual void copyFrom (const OOF_recordBufferedContext &)
unsigned long currentOffset () const
 operator unsigned long () const
bool operator== (unsigned long) const
bool operator== (const OOF_recordBufferedContext &) const
bool isNew () const
char * buffer () const

Protected Types


Protected Member Functions

 OOF_simpleRecordBackend (dbTable *)
 OOF_simpleRecordBackend (const OOF_simpleRecordBackend &, dbTable::selSharingT, dbTable *)
void * GetFieldWriteDest (const dbField *)
void * GetFieldReadFrom (fieldNumT) const
bool Invariant (const char *optionalComment=0) const
 Check combination of member variables defining Invariant state.

oofString InvariantDescription () const
unsigned long state () const
virtual void BuildBackendtables (bool rebuilding)=0
 backend construction

unsigned long PadFieldWidthForAlignment (const dbField *fld) const
unsigned int FieldAlignsTo (const dbField *) const
virtual void CachingContextChange ()
virtual void ContextChange ()
virtual bool CanUseIndex (const dbField *, dbQueryClause::BinaryQueryOps=dbQueryClause::equals) const
bool IgnoringDuplicateRecords () const
virtual void SaveContext ()=0
unsigned long BlobLenFromBuffer (const dbField *, const char *theirBuffer) const
unsigned long BlobPosFromBuffer (const dbField *fld, const char *theirBuffer) const
unsigned long BlobLenFromBuffer (fieldNumT, const char *theirBuffer) const
unsigned long BlobPosFromBuffer (fieldNumT, const char *theirBuffer) const
void SetBlobLenInBuffer (fieldNumT, unsigned long len, const char *theirBuffer) const
void SetBlobPosInBuffer (fieldNumT, unsigned long pos, const char *theirBuffer) const
virtual void LoadRecordAtOffset (unsigned long offset)=0
bool MaybeLoadRecordFromCache (unsigned long offset)
bool CommonSimpleDelete ()
bool GotoRecordForAllUnindexed (unsigned long relativeNum)
void AdoptBuffer (OOF_recordBufferedContext *)
void DonateBlobBodiesTo (OOF_recordBufferedContext *)
void CacheDirtyCurrentRecord ()
void ResetBlobs ()
bool tableCachesDirtyRecords () const
void AllocBuffer ()

Protected Attributes

OOF_recordSelection mSelection
OOF_recordFieldEntrymFieldBufMap
unsigned int * mFieldBufMapRefCount
unsigned short mNumFiles
unsigned short mNumIndexes
unsigned short mOverheadLeadingBytes
OOF_ExpandableLongArraymBlobFieldNums
OOF_recordCachemDirtyRecordCache
bool mIgnoreDuplicateRecords
OOF_Dictionary mFields
dbTablemTable
bool mDirty
bool mHasDefaultCalculators
bool mHasStoredCalculators
ERecordState mRecordState
unsigned long mCurrLoadedRecOffset
unsigned long mRecBufLen
char * mBuffer
OOF_ExpandableLongArraymBlobFieldBodies
OOF_dirtyFieldMap mDirtyMap

Friends

class OOF_recordCacheCopier
class dbTable
class OOF_simpleRecordBackend


Member Enumeration Documentation

enum OOF_recordBufferedContext::ERecordState [inherited]
 

Enumeration values:
eNew 
eLoaded 
eUnloaded 

enum OOF_simpleRecordBackend::OOF_wctype [protected]
 

Enumeration values:
prefix 
single 
multiple 
singlefinal 
multiplefinal 


Constructor & Destructor Documentation

OOF_simpleRecordBackend::OOF_simpleRecordBackend dbTable  )  [protected]
 

OOF_simpleRecordBackend::OOF_simpleRecordBackend const OOF_simpleRecordBackend ,
dbTable::selSharingT  ,
dbTable
[protected]
 

OOF_simpleRecordBackend::~OOF_simpleRecordBackend  )  [virtual]
 


Member Function Documentation

void OOF_simpleRecordBackend::abortTransaction short  rMode  )  [virtual]
 

Implements OOF_tableBackend.

virtual void OOF_tableBackend::addIndices const char *  newIDXname  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

bool OOF_simpleRecordBackend::addOIDtoSelection oidT   )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::AdoptBuffer OOF_recordBufferedContext  )  [protected]
 

void OOF_recordBufferedContext::AllocBuffer  )  [protected, inherited]
 

bool OOF_simpleRecordBackend::allSelected  )  const [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::atFirst  )  const [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::atLast  )  const [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::atRelative unsigned  long  )  const [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::beginTransaction short  tMode  )  [virtual]
 

Implements OOF_tableBackend.

unsigned long OOF_simpleRecordBackend::BlobLenFromBuffer fieldNumT  ,
const char *  theirBuffer
const [protected]
 

unsigned long OOF_simpleRecordBackend::BlobLenFromBuffer const dbField ,
const char *  theirBuffer
const [inline, protected]
 

unsigned long OOF_simpleRecordBackend::blobPointerReferenceSize  )  const [virtual]
 

Implements OOF_tableBackend.

unsigned long OOF_simpleRecordBackend::BlobPosFromBuffer fieldNumT  ,
const char *  theirBuffer
const [protected]
 

unsigned long OOF_simpleRecordBackend::BlobPosFromBuffer const dbField fld,
const char *  theirBuffer
const [inline, protected]
 

char * OOF_recordBufferedContext::buffer  )  const [inline, inherited]
 

virtual void OOF_simpleRecordBackend::BuildBackendtables bool  rebuilding  )  [protected, pure virtual]
 

backend construction

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

void OOF_simpleRecordBackend::buildSchema bool  rebuilding = false  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

void OOF_simpleRecordBackend::CacheDirtyCurrentRecord  )  [protected]
 

void OOF_simpleRecordBackend::CachingContextChange  )  [protected, virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::CanUseIndex const dbField ,
dbQueryClause::BinaryQueryOps  = dbQueryClause::equals
const [protected, virtual]
 

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

bool OOF_simpleRecordBackend::checkDuplicate const dbQueryClause  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

virtual OOF_tableBackend* OOF_simpleRecordBackend::clone dbTable::selSharingT  ,
dbTable
const [pure virtual]
 

Implements OOF_tableBackend.

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, OOF_rampBackend, and OOF_ramBackend.

virtual void OOF_tableBackend::close  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, OOF_rampBackend, and OOF_ramBackend.

void OOF_simpleRecordBackend::commitTransaction short  rMode  )  [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::CommonSimpleDelete  )  [protected]
 

bool OOF_simpleRecordBackend::contains oidT   )  const [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::ContextChange  )  [protected, virtual]
 

Implements OOF_tableBackend.

void OOF_recordBufferedContext::copyFrom const OOF_recordBufferedContext  )  [virtual, inherited]
 

void OOF_recordBufferedContext::copyFrom const OOF_recordBufferedContext  )  [inline, inherited]
 

unsigned long OOF_simpleRecordBackend::count  )  const [virtual]
 

See also:
countAll

Implements OOF_tableBackend.

virtual unsigned long OOF_tableBackend::countAll  )  const [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

virtual void OOF_tableBackend::createTableInConnection const dbConnect  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

unsigned long OOF_recordBufferedContext::currentOffset  )  const [inline, inherited]
 

oidT OOF_simpleRecordBackend::currentOID  )  [virtual]
 

Implements OOF_tableBackend.

dbSelection OOF_simpleRecordBackend::currentSelection  )  const [virtual]
 

Implements OOF_tableBackend.

virtual void OOF_tableBackend::deleteRecord  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

void OOF_tableBackend::deleteStorage  )  [virtual, inherited]
 

Reimplemented in OOF_ctreeBackend, OOF_dbaseBackend, and OOF_FServBackend.

void OOF_simpleRecordBackend::describeInvariant std::ostream &   )  const [virtual]
 

debugging

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::describeState std::ostream &   )  const [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::difference_with const dbSelection  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::difference_with const OOF_tableBackend  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::DonateBlobBodiesTo OOF_recordBufferedContext  )  [protected]
 

void OOF_simpleRecordBackend::dropRecordFromSelection unsigned  long  )  [virtual]
 

Implements OOF_tableBackend.

dbField * OOF_tableBackend::field fieldNumT   )  const [inline, inherited]
 

unsigned int OOF_simpleRecordBackend::FieldAlignsTo const dbField  )  const [protected]
 

unsigned long OOF_simpleRecordBackend::fieldDataLen const dbField  )  const [virtual]
 

Implements OOF_tableBackend.

void OOF_tableBackend::fieldHasDefaultCalculator dbField  )  [inline, inherited]
 

void OOF_tableBackend::fieldHasStoredCalculator dbField  )  [inline, inherited]
 

bool OOF_simpleRecordBackend::fieldIsDirty fieldNumT   )  const [virtual]
 

Implements OOF_tableBackend.

char * OOF_simpleRecordBackend::getByteWriteAddress unsigned  long,
const dbField
[virtual]
 

Implements OOF_tableBackend.

void * OOF_simpleRecordBackend::GetFieldReadFrom fieldNumT   )  const [protected]
 

void * OOF_simpleRecordBackend::GetFieldWriteDest const dbField  )  [protected]
 

void OOF_simpleRecordBackend::gotoBOF  )  [inline]
 

virtual bool OOF_tableBackend::gotoRecord unsigned long  relativeNum  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

bool OOF_simpleRecordBackend::GotoRecordForAllUnindexed unsigned long  relativeNum  )  [protected]
 

void OOF_simpleRecordBackend::ignoreDuplicateRecords  )  [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::IgnoringDuplicateRecords  )  const [inline, protected]
 

void OOF_simpleRecordBackend::intersection_with const dbSelection  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::intersection_with const OOF_tableBackend  )  [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::Invariant const char *  optionalComment = 0  )  const [protected]
 

Check combination of member variables defining Invariant state.

Used to guard against changes to code allowing backend to enter illegal states.

Note:
If you define a filename OOF_INVARIANT_DUMP_NAME this will dump a very comprehensive log of all OOFILE execution, as Invariant is called on entry and exit from most backend methods that affect the database.
Todo:
change code checking for some states to work on Intel byte order

oofString OOF_simpleRecordBackend::InvariantDescription  )  const [protected]
 

void OOF_simpleRecordBackend::invert  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

bool OOF_tableBackend::isDirty  )  const [inline, inherited]
 

bool OOF_recordBufferedContext::isNew  )  const [inline, inherited]
 

bool OOF_simpleRecordBackend::isNewRecord  )  const [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::isRecordLoaded  )  const [virtual]
 

Implements OOF_tableBackend.

virtual void OOF_tableBackend::loadBlob const dbBLOB  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

virtual void OOF_simpleRecordBackend::LoadRecordAtOffset unsigned long  offset  )  [protected, pure virtual]
 

Implemented in OOF_ramBackend.

bool OOF_simpleRecordBackend::loadRelatedContextJoiningFromTo const dbField fldFrom,
const dbField fldTo
[virtual]
 

Implements relationships via searching.

Changes the current selection

Parameters:
fldFrom supplies the value to be searched for.
fldTo is a field probably on the current table, which is the target of the search
Returns:
true if finds any records Always changes the current selection, like search().

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::lockRecord  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

dbSelection OOF_simpleRecordBackend::makeEmptySelection  )  const [virtual]
 

Implements OOF_tableBackend.

void OOF_tableBackend::markDirty  )  [inline, inherited]
 

bool OOF_simpleRecordBackend::MaybeLoadRecordFromCache unsigned long  offset  )  [protected]
 

bool OOF_simpleRecordBackend::more  )  const [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::newRecord  )  [virtual]
 

Sets up a new record ready to enter data On exit the state is: Selection state is aboutToDirty Selection Set record state to New Set dirty to false Clear buffer Append new record to selection.

Set current loaded record offset to point to new appended record.

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

virtual void OOF_tableBackend::next  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

void OOF_simpleRecordBackend::noticeDuplicateRecords  )  [virtual]
 

Implements OOF_tableBackend.

unsigned int OOF_simpleRecordBackend::numFiles  )  const [virtual]
 

Implements OOF_tableBackend.

unsigned int OOF_simpleRecordBackend::numIndexes  )  const [virtual]
 

Implements OOF_tableBackend.

oidT OOF_simpleRecordBackend::oidOfRecord unsigned  long  )  [virtual]
 

Implements OOF_tableBackend.

virtual bool OOF_tableBackend::openTableInConnection const dbConnect ,
const bool  createIfMissing = false
[pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, OOF_rampBackend, and OOF_ramBackend.

OOF_recordBufferedContext::operator unsigned long  )  const [inline, inherited]
 

bool OOF_recordBufferedContext::operator== const OOF_recordBufferedContext  )  const [inherited]
 

bool OOF_recordBufferedContext::operator== unsigned  long  )  const [inline, inherited]
 

void OOF_simpleRecordBackend::pack  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_dbaseBackend.

unsigned long OOF_simpleRecordBackend::PadFieldWidthForAlignment const dbField fld  )  const [protected]
 

void OOF_simpleRecordBackend::prev  )  [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::readBool const dbField inField  )  const [virtual]
 

Assumes bools stored as unsigned short, 0==false.

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.

const char * OOF_simpleRecordBackend::readChars const dbField inField  )  const [virtual]
 

Returns:
pointer to area expected to remain allocated, maybe null.

Implements OOF_tableBackend.

double OOF_simpleRecordBackend::readDouble const dbField inField  )  const [virtual]
 

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.

long OOF_simpleRecordBackend::readLong const dbField inField  )  const [virtual]
 

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.

short OOF_simpleRecordBackend::readShort const dbField inField  )  const [virtual]
 

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.

oofString OOF_simpleRecordBackend::readString const dbField  )  const [virtual]
 

Copy field data into a string.

Implements OOF_tableBackend.

virtual void OOF_tableBackend::rebuild  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

unsigned long OOF_simpleRecordBackend::recordNumber  )  const [virtual]
 

Implements OOF_tableBackend.

unsigned long OOF_simpleRecordBackend::recordNumberMatching const dbQueryClause qClause,
bool *  outFoundIt = 0
const [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

unsigned long OOF_simpleRecordBackend::recordNumberOfOID oidT  inOID  )  [virtual]
 

Implement dbTable::recordNumberOfOID.

Returns:
zero-based record number or ULONG_MAX if not found
Todo:
abstract the allRecs case so can implement efficiently in c-tree.

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::reloadRecord  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::ResetBlobs  )  [protected]
 

void OOF_simpleRecordBackend::revertRecord  )  [virtual]
 

Implements OOF_tableBackend.

virtual void OOF_simpleRecordBackend::SaveContext  )  [protected, pure virtual]
 

Implemented in OOF_ramBackend.

void OOF_simpleRecordBackend::saveRecord  )  [virtual]
 

Save current main record and any cached dirty records.

Broadcasts to related records and other listeners so may re-dirty records in the process. Loops creating OOF_recordCacheCopier dependant on our dbTable which will repeatedly pull items out of the cache and get the table to save them. This yo-yoing is necessary to get the table to broadcast changes, in case the cached records have dependancies such as relationships hanging off them.

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

bool OOF_simpleRecordBackend::search const dbQueryClause qClause  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

bool OOF_simpleRecordBackend::SearchBetweenNonIndexed const dbField ,
const void *  ,
const void * 
[protected]
 

bool OOF_simpleRecordBackend::SearchBetweenNonIndexed const dbField ,
const char *  ,
const char * 
[protected]
 

bool OOF_simpleRecordBackend::SearchBinaryFieldToLiteral const dbQueryBinary  )  [protected, virtual]
 

bool OOF_simpleRecordBackend::SearchCombineSubclauses const dbQueryBinaryCombo ,
bool  searchSel
[protected, virtual]
 

bool OOF_simpleRecordBackend::SearchComparativeNonIndexed const dbField ,
const void *  ,
dbQueryClause::BinaryQueryOps 
[protected]
 

bool OOF_simpleRecordBackend::SearchComparativeNonIndexed const dbField ,
const char *  ,
dbQueryClause::BinaryQueryOps 
[protected]
 

bool OOF_simpleRecordBackend::searchEqual const dbField ,
const void * 
[virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::searchEqual const dbField ,
const char *  ,
bool  matchEntireKey = true
[virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

bool OOF_simpleRecordBackend::SearchEqualNonIndexed const dbField ,
const void * 
[protected]
 

bool OOF_simpleRecordBackend::SearchEqualNonIndexed const dbField ,
const char *  ,
bool  matchEntireKey = true
[protected]
 

bool OOF_simpleRecordBackend::SearchEqualNonIndexedWildcard const dbField schField,
const char *  schStr,
bool  matchEntireKey = true
[protected]
 

bool OOF_simpleRecordBackend::SearchNotEqualNonIndexed const dbField ,
const void * 
[protected]
 

bool OOF_simpleRecordBackend::SearchNotEqualNonIndexed const dbField ,
const char *  ,
bool  matchEntireKey = true
[protected]
 

bool OOF_simpleRecordBackend::SearchNotEqualNonIndexedWildcard const dbField schField,
const char *  schStr,
bool  matchEntireKey = true
[protected]
 

bool OOF_simpleRecordBackend::SearchOutsideNonIndexed const dbField ,
const void *  ,
const void * 
[protected]
 

bool OOF_simpleRecordBackend::SearchOutsideNonIndexed const dbField ,
const char *  ,
const char * 
[protected]
 

bool OOF_simpleRecordBackend::searchSelContainsAllDelimited const dbField schField,
const char *  schStr,
char  delim
[virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::searchSelContainsAllOf const dbField schField,
const char **  schStrs,
unsigned long  count
[virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::searchSelContainsAnyDelimited const dbField schField,
const char *  schStr,
char  delim
[virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::searchSelContainsAnyOf const dbField schField,
const char **  schStrs,
unsigned long  count
[virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::searchSelection const dbQueryClause  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

bool OOF_simpleRecordBackend::SearchSelectionBinaryFieldToLiteral const dbQueryBinary  )  [protected, virtual]
 

bool OOF_simpleRecordBackend::SearchSelectionTrinaryFieldToLiterals const dbQueryTrinary  )  [protected]
 

bool OOF_simpleRecordBackend::SearchTrinaryFieldToLiterals const dbQueryTrinary  )  [protected, virtual]
 

bool OOF_simpleRecordBackend::SearchWordNonIndexed const dbField ,
const char *  ,
bool  startsWith = false
[protected]
 

void OOF_simpleRecordBackend::selectAll  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::selectJustCurrent  )  [virtual]
 

Implements OOF_tableBackend.

bool OOF_simpleRecordBackend::selectJustOID oidT  inOID  )  [virtual]
 

Parameters:
inOID record address, zero is accepted but causes selectNone() dbTable::selectJustOID will react similarly to zero oidT.
Todo:
validate that inOID is valid existing record

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::selectNone  )  [virtual]
 

Implements OOF_tableBackend.

virtual unsigned long OOF_tableBackend::sequenceNumber  )  const [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

void OOF_simpleRecordBackend::setBlobLength fieldNumT  ,
unsigned long  len
[virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::SetBlobLenInBuffer fieldNumT  ,
unsigned long  len,
const char *  theirBuffer
const [protected]
 

void OOF_simpleRecordBackend::SetBlobPosInBuffer fieldNumT  ,
unsigned long  pos,
const char *  theirBuffer
const [protected]
 

virtual void OOF_simpleRecordBackend::setFileExtensions const char *  ,
const char * 
[inline, virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

void OOF_simpleRecordBackend::setSelection const OOF_Selection  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::setSelection const dbSelection  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::setSortOrder dbSorter adoptSorter  )  [virtual]
 

Implements OOF_tableBackend.

dbSorter * OOF_simpleRecordBackend::sorter  )  const [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbField theFld,
unsigned long  fixedBinaryLength
[protected]
 

Bug:
Needs implementing by copying bytes or generating a comparison object. like SortSelectionNow(const dbField* theFld, unsigned long fixedBinaryLength)

Todo:
reimplement fixedBinary SortSelectionInverseNow without binaryContents()

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbText theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbChar theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbReal theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbShort theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbUshort theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbLong theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionInverseNow const dbUlong theFld  )  [protected]
 

void OOF_simpleRecordBackend::sortSelectionInverseNow fieldNumT   )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::SortSelectionNow const dbField theFld,
unsigned long  fixedBinaryLength
[protected]
 

Bug:
Needs implementing by copying bytes or generating a comparison object. Alternatives considered: 1) backend is Abstract Factory for byte copier and field comparer 2) need a readBytes interface for dbFixedBinary, and rewrite this sort for dbFixedBinary alone

Todo:
reimplement fixedBinary SortSelectionNow without binaryContents()

void OOF_simpleRecordBackend::SortSelectionNow const dbText theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionNow const dbChar theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionNow const dbReal theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionNow const dbShort theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionNow const dbUshort theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionNow const dbLong theFld  )  [protected]
 

void OOF_simpleRecordBackend::SortSelectionNow const dbUlong theFld  )  [protected]
 

void OOF_simpleRecordBackend::sortSelectionNow const dbSorter theSorter  )  [virtual]
 

Ken's comments on how the sort works
start by sorting and partitioning the base field
This could use som heuristics if the field in indexed, since ctree does some of this good stuff for us - for now, we just use a non-indexed case..

At least we could get ctree to put the fields in the correct order for us ! But later - let's get it working for now !

Warning:
Don't shortcut the process by using direct copyBlah accessors on these fields. Although it seems less efficient to be using the (dbUlong*)theField instead of readLong(theField) there is one important difference in that the field-level method also allows for calculated or non-persistent fields.

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::sortSelectionNow fieldNumT   )  [virtual]
 

Implements OOF_tableBackend.

virtual void OOF_tableBackend::start  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

unsigned long OOF_simpleRecordBackend::state  )  const [protected]
 

void OOF_simpleRecordBackend::SubSort const dbSorter theSorter,
const unsigned long  level,
unsigned long *  theData,
const unsigned long  count
[protected]
 

Now we're sorting at the recursive level of partitioning in a nested sort !

We have a pseudo-selection in the form of a fixed array of unsigned longs (which are record pointers) and we will simply rearrange them within the storage passed to us

NOTE: The array passed to us with have the records in current record order ie: We will only be jumping forward

I hope this doesn't screw up Andy's Selection Stuff ! : )

Author:
Ken Taylor

virtual void OOF_tableBackend::suppressIndices  )  [pure virtual, inherited]
 

Implemented in OOF_ctreeBackend, OOF_dbaseBackend, OOF_FServBackend, and OOF_ramBackend.

dbTable * OOF_tableBackend::table  )  const [inline, inherited]
 

bool OOF_tableBackend::tableCachesDirtyRecords  )  const [inline, protected, inherited]
 

void OOF_simpleRecordBackend::union_with const dbSelection  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::union_with const OOF_tableBackend  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::union_with_no_overlap const dbSelection  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::union_with_no_overlap const OOF_tableBackend  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::unloadCache  )  [virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::unloadRecord  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

void OOF_simpleRecordBackend::unlockRecord  )  [virtual]
 

Implements OOF_tableBackend.

Reimplemented in OOF_ctreeBackend, and OOF_FServBackend.

void OOF_simpleRecordBackend::writeBool bool  inNum,
const dbField inField
[virtual]
 

Encode bool as short to be decoded by readBool.

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::writeBytes const char *  inBuf,
long  inLen,
const dbField inField
[virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::writeChars const char *  ,
long  numChars,
long  maxLen,
const dbField ,
long  startIndex = 0
[virtual]
 

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::writeDouble double  inNum,
const dbField inField
[virtual]
 

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::writeLong long  inNum,
const dbField inField
[virtual]
 

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.

void OOF_simpleRecordBackend::writeShort short  inNum,
const dbField inField
[virtual]
 

Warning:
relies on backend returning fields aligned to processor-legal boundaries
Todo:
add assertion testing return address is legally aligned

Implements OOF_tableBackend.


Friends And Related Function Documentation

friend class dbTable [friend, inherited]
 

friend class OOF_recordCacheCopier [friend]
 

friend class OOF_simpleRecordBackend [friend, inherited]
 


Member Data Documentation

OOF_ExpandableLongArray* OOF_recordBufferedContext::mBlobFieldBodies [protected, inherited]
 

OOF_ExpandableLongArray* OOF_simpleRecordBackend::mBlobFieldNums [protected]
 

char* OOF_recordBufferedContext::mBuffer [protected, inherited]
 

unsigned long OOF_recordBufferedContext::mCurrLoadedRecOffset [protected, inherited]
 

bool OOF_tableBackend::mDirty [protected, inherited]
 

OOF_dirtyFieldMap OOF_recordBufferedContext::mDirtyMap [protected, inherited]
 

OOF_recordCache* OOF_simpleRecordBackend::mDirtyRecordCache [protected]
 

OOF_recordFieldEntry* OOF_simpleRecordBackend::mFieldBufMap [protected]
 

unsigned int* OOF_simpleRecordBackend::mFieldBufMapRefCount [protected]
 

OOF_Dictionary OOF_tableBackend::mFields [protected, inherited]
 

bool OOF_tableBackend::mHasDefaultCalculators [protected, inherited]
 

bool OOF_tableBackend::mHasStoredCalculators [protected, inherited]
 

bool OOF_simpleRecordBackend::mIgnoreDuplicateRecords [protected]
 

unsigned short OOF_simpleRecordBackend::mNumFiles [protected]
 

unsigned short OOF_simpleRecordBackend::mNumIndexes [protected]
 

unsigned short OOF_simpleRecordBackend::mOverheadLeadingBytes [protected]
 

unsigned long OOF_recordBufferedContext::mRecBufLen [protected, inherited]
 

ERecordState OOF_recordBufferedContext::mRecordState [protected, inherited]
 

OOF_recordSelection OOF_simpleRecordBackend::mSelection [protected]
 

dbTable* OOF_tableBackend::mTable [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 01:28:28 2004 for OOFILE by doxygen 1.3.5