#include <oof1.h>
Inheritance diagram for dbConnect:


Subclassed to indicate type of database backend to use.
Public Member Functions | |
| dbConnect (bool isTemporary=false) | |
| virtual | ~dbConnect () |
| Destroys tables if any are left that we own, allowing for dynamic database creation. | |
| virtual oofString | name () const |
| virtual void | newConnection (const char *connectionName)=0 |
| virtual void | openConnection (const char *connectionName)=0 |
| virtual void | newConnection (const FSSpec &)=0 |
| virtual void | openConnection (const FSSpec &)=0 |
| virtual void | close ()=0 |
| virtual void | deleteStorage () |
| virtual bool | usesSeparateStorageFiles () const |
| void | gotoDatabaseDir () const |
| oofDirectory * | databaseDirectory () const |
| const oofString & | connectionName () const |
| void | attachTable (dbTable *) |
| dbTable * | table (unsigned int) const |
| dbTable * | table (const char *) |
| unsigned int | numTables () const |
| bool | isOpen () const |
| bool | inDeclarativePhase () const |
| Connection has been declared but not opened or created. | |
| virtual void | exitLocking ()=0 |
| virtual void | enterWriteLocking ()=0 |
| virtual void | enterReadLocking ()=0 |
| virtual void | describe (std::ostream &) const |
| Provide human-readable information about object. | |
| virtual void | writeOOFSchema () |
| virtual void | readOOFSchema (const oofString &schemaFileName) |
| Reads & parses oofSchema from the file schemaFileName. | |
| virtual void | stats (std::ostream &) |
| void | dumpData (std::ostream &) |
| void | extract (std::ostream &os) |
| void | copyAllFrom (dbConnect *) |
| void | deleteAll () |
| void | generateTestData (unsigned long maxRecs=10000, bool generateRandom=true, unsigned long seedOrCount=0) |
| void | schemaFileExt (const oofString &) |
| void | suspendSorting () const |
| void | resumeSorting () const |
| oofWordParser * | getDefaultWordParser () |
| void | setDefaultWordParser (oofWordParser *inParser) |
| bool | hidden () const |
| void | hide (bool hideIt=true) |
Static Public Member Functions | |
| dbConnect * | currentlyConstructing () |
| bool | fileExists (const char *fName) |
| bool | underConstruction () |
| void | raise (std::ostream &, bool terminateAfterMsg=true) |
| void | raise (const char *, bool terminateAfterMsg=true) |
| void | truncateTrailingSpaces (bool willTruncate=true) |
| bool | willTruncateTrailingSpaces () |
Protected Types | |
| enum | connectionFileStateT { eIdle = 0, eStart = 1, eOpenedFile = 2, eCreatedFile = 4, eInvalidlyOpenInCreation = 8, eInvalidlyCreationInOpen = 16 } |
Protected Member Functions | |
| void | MakeAllTablesValid () const |
| Final step in construction, can use tables against database after this. | |
| void | InitOpenOrCreateState () |
| void | OpenOrCreateStateTransition (bool inOpenedOrCreated) |
| Manage state transitions for FinishOpenOrCreateConnection. | |
| virtual void | WriteOOFSchemaFile () |
| Write the oofschema out to the schema file. | |
| virtual oofString | MakeSchemaFileName () |
| produce a file name for schema file. | |
| oofString | MakeOOFSchemaString () |
| Produce a string containing the oofschema with the length of the schema string aphended to the end. | |
Protected Attributes | |
| OOF_Dictionary | mTables |
| oofString | mConnectionName |
| oofString | mSchemaFileName |
| bool | mOpen |
| bool | mTempDatabase |
| bool | mInDeclarativePhase |
| oofWordParser * | mDefaultPrototypeParser |
| oofDirectory * | mDatabaseDir |
| connectionFileStateT | mFileState |
| bool | mHidden |
Static Protected Attributes | |
| dbConnect * | sCurrentlyConstructing |
| this static gets zeroed in dbTable::postCloneTableCleanup() this is how we avoid passing dbTable pointers around all the time when creating fields particularly in user constructors when it would clutter things up a LOT! | |
| bool | sTruncateTrailingSpaces = false |
| oofString | sSchemaFileExt = "osc" |
|
|
|
|
|
|
|
|
Destroys tables if any are left that we own, allowing for dynamic database creation.
|
|
|
|
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, dbConnect_ram, and dbConnect_ramp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in dbConnect_ctree, dbConnect_FServ, and dbConnect_ramp. |
|
|
Provide human-readable information about object. Overriden to provide much more detail particularly for dbTable::describe() which provides full schema. Reimplemented from OOF_PublicBase. |
|
|
|
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, and dbConnect_ram. |
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, and dbConnect_ram. |
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, and dbConnect_ram. |
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Connection has been declared but not opened or created. Only one connection at a time can be in this state.
|
|
|
|
|
|
|
|
|
Final step in construction, can use tables against database after this.
|
|
|
Produce a string containing the oofschema with the length of the schema string aphended to the end. The length is used as an offset in dbConnect_rampBackend to find the schema beginning |
|
|
produce a file name for schema file. If a file name exists for the data base use it with the extension sSchemaFileExt (default "osc") else use the connection name with sSchemaFileExt appended.
|
|
|
Reimplemented from OOF_PublicBase. |
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, dbConnect_ram, and dbConnect_ramp. |
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, dbConnect_ram, and dbConnect_ramp. |
|
|
|
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, dbConnect_ram, and dbConnect_ramp. |
|
|
Implemented in dbConnect_ctree, dbConnect_dbase, dbConnect_FServ, dbConnect_ram, and dbConnect_ramp. |
|
|
Manage state transitions for FinishOpenOrCreateConnection.
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Reads & parses oofSchema from the file schemaFileName. Populates the dbConnect::sCurrentlyConstructing connection with extra tables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in dbConnect_ctree, dbConnect_dbase, and dbConnect_FServ. |
|
|
|
|
|
Reimplemented in dbConnect_ctree, dbConnect_ram, and dbConnect_ramp. |
|
|
Write the oofschema out to the schema file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this static gets zeroed in dbTable::postCloneTableCleanup() this is how we avoid passing dbTable pointers around all the time when creating fields particularly in user constructors when it would clutter things up a LOT!
|
|
|
|
|
|
|
1.3.5