#include <CifSchemaMap.h>
Inherited by DbDb2, DbMySql, DbOracle, and DbSybase.
Inheritance diagram for Db:
Public Member Functions | |
Db (SchemaMapping &schemaMapping) | |
virtual | ~Db () |
void | SetUseOnlyPopulated (bool mode=true) |
bool | GetUseOnlyPopulated () |
void | SetAppendFlag (const bool appendFlag) |
bool | GetAppendFlag () |
virtual void | SetDatabaseName (const string &dbName) |
void | SetDatabaseUser (const string &dbUser) |
void | SetFieldSeparator (const string &fieldSeparator) |
void | SetRowSeparator (const string &rowSeparator) |
string | GetCommandTerm () |
string | GetFieldSeparator () |
string | GetRowSeparator () |
virtual void | GetStart (string &start) |
virtual void | WriteSchemaStart (ostream &io) |
virtual void | WriteDeleteTable (ostream &io, const string &fromTable, const string &tableNameDb) |
virtual void | WriteThirdDeleteTable (ostream &io, const string &tableNameDb) |
virtual void | DropTableSql (ostream &io, const string &tableName) |
virtual const string & | GetExec () |
virtual const string & | GetExecOption () |
virtual const string & | GetUserOption () |
virtual const string & | GetPassOption () |
virtual const string & | GetEnvDbUser () |
virtual const string & | GetEnvDbPass () |
virtual const string & | GetConnect () |
virtual const string & | GetTerminate () |
virtual const string & | GetScriptCommand () |
virtual void | WriteLoad (ostream &io) |
const string & | GetLoadingFileName () |
virtual void | WriteLoadingStart (ostream &io) |
virtual void | WriteLoadingEnd (ostream &io) |
virtual void | WriteLoadingTable (ostream &io, const string &tableName, const string &path) |
virtual void | WritePrint (ostream &io, const string &tableNameDb) |
virtual void | GetChar (string &dType, const unsigned int width) |
virtual void | GetFloat (string &dType) |
virtual void | GetText (string &dType, const unsigned int width) |
virtual void | GetDate (string &dType) |
virtual void | WriteNull (ostream &io, const int iNull, const unsigned int curr, const unsigned int attSize) |
virtual void | WriteTableIndex (ostream &io, const string &tableNameDb, const vector< string > &indexList) |
const string & | GetBcpStringDelimiter () |
virtual void | WriteBcpDoubleQuotes (ostream &io) |
virtual void | WriteNewLine (ostream &io, bool special=false) |
bool | IsFirstTextNewLineSpecial () |
Public Attributes | |
SchemaMapping & | _schemaMapping |
Protected Attributes | |
bool | _useOnlyPopulated |
bool | _appendFlag |
string | _fieldSeparator |
string | _rowSeparator |
string | _cmdTerm |
string | _dbName |
string | _dbUser |
string | _exec |
string | _execOption |
string | _userOption |
string | _passOption |
string | _connect |
string | _terminate |
string | _scriptCommand |
string | _envDbUser |
string | _envDbPass |
string | _loadFileName |
string | _bcpStringDelimiter |
bool | _firstTextNewLineSpecial |
Static Private Attributes | |
static const string | _LOAD_COMMAND_FILE |
This class encapsulates general characteristics of each database. It contains methods for generic database related operations and virtual methods, that are to be specialized in concrete databases.
Db::Db | ( | SchemaMapping & | schemaMapping | ) |
Db::~Db | ( | ) | [virtual] |
void Db::SetUseOnlyPopulated | ( | bool | mode = true |
) |
bool Db::GetUseOnlyPopulated | ( | ) |
void Db::SetAppendFlag | ( | const bool | appendFlag | ) |
bool Db::GetAppendFlag | ( | ) |
void Db::SetDatabaseName | ( | const string & | dbName | ) | [virtual] |
Reimplemented in DbDb2.
void Db::SetDatabaseUser | ( | const string & | dbUser | ) |
void Db::SetFieldSeparator | ( | const string & | fieldSeparator | ) |
void Db::SetRowSeparator | ( | const string & | rowSeparator | ) |
string Db::GetCommandTerm | ( | ) |
string Db::GetFieldSeparator | ( | ) |
string Db::GetRowSeparator | ( | ) |
void Db::WriteDeleteTable | ( | ostream & | io, | |
const string & | fromTable, | |||
const string & | tableNameDb | |||
) | [virtual] |
Reimplemented in DbDb2.
void Db::WriteThirdDeleteTable | ( | ostream & | io, | |
const string & | tableNameDb | |||
) | [virtual] |
Reimplemented in DbDb2.
void Db::DropTableSql | ( | ostream & | io, | |
const string & | tableName | |||
) | [virtual] |
Reimplemented in DbMySql.
const string & Db::GetExec | ( | ) | [virtual] |
const string & Db::GetExecOption | ( | ) | [virtual] |
const string & Db::GetUserOption | ( | ) | [virtual] |
const string & Db::GetPassOption | ( | ) | [virtual] |
const string & Db::GetEnvDbUser | ( | ) | [virtual] |
const string & Db::GetEnvDbPass | ( | ) | [virtual] |
const string & Db::GetConnect | ( | ) | [virtual] |
const string & Db::GetTerminate | ( | ) | [virtual] |
const string & Db::GetScriptCommand | ( | ) | [virtual] |
void Db::WriteLoad | ( | ostream & | io | ) | [virtual] |
Reimplemented in DbMySql.
const string & Db::GetLoadingFileName | ( | ) |
void Db::WriteLoadingStart | ( | ostream & | io | ) | [virtual] |
void Db::WriteLoadingEnd | ( | ostream & | io | ) | [virtual] |
Reimplemented in DbDb2.
void Db::WriteLoadingTable | ( | ostream & | io, | |
const string & | tableName, | |||
const string & | path | |||
) | [virtual] |
void Db::WritePrint | ( | ostream & | io, | |
const string & | tableNameDb | |||
) | [virtual] |
Reimplemented in DbSybase.
void Db::GetChar | ( | string & | dType, | |
const unsigned int | width | |||
) | [virtual] |
void Db::GetFloat | ( | string & | dType | ) | [virtual] |
Reimplemented in DbDb2.
void Db::GetText | ( | string & | dType, | |
const unsigned int | width | |||
) | [virtual] |
void Db::WriteNull | ( | ostream & | io, | |
const int | iNull, | |||
const unsigned int | curr, | |||
const unsigned int | attSize | |||
) | [virtual] |
void Db::WriteTableIndex | ( | ostream & | io, | |
const string & | tableNameDb, | |||
const vector< string > & | indexList | |||
) | [virtual] |
const string & Db::GetBcpStringDelimiter | ( | ) |
void Db::WriteBcpDoubleQuotes | ( | ostream & | io | ) | [virtual] |
Reimplemented in DbDb2.
void Db::WriteNewLine | ( | ostream & | io, | |
bool | special = false | |||
) | [virtual] |
bool Db::IsFirstTextNewLineSpecial | ( | ) |
bool Db::_useOnlyPopulated [protected] |
bool Db::_appendFlag [protected] |
string Db::_fieldSeparator [protected] |
string Db::_rowSeparator [protected] |
string Db::_cmdTerm [protected] |
string Db::_dbName [protected] |
string Db::_dbUser [protected] |
string Db::_exec [protected] |
string Db::_execOption [protected] |
string Db::_userOption [protected] |
string Db::_passOption [protected] |
string Db::_connect [protected] |
string Db::_terminate [protected] |
string Db::_scriptCommand [protected] |
string Db::_envDbUser [protected] |
string Db::_envDbPass [protected] |
string Db::_loadFileName [protected] |
string Db::_bcpStringDelimiter [protected] |
bool Db::_firstTextNewLineSpecial [protected] |
const string Db::_LOAD_COMMAND_FILE [static, private] |