#include <Db.h>
Inherited by DbDb2, DbMySql, DbOracle, and DbSybase.
Inheritance diagram for Db:
Public Member Functions | |
Db (SchemaMap &schemaMapping, const std::string &dbName=DB_DEFAULT_NAME) | |
virtual | ~Db () |
void | SetUseOnlyPopulated (bool mode=true) |
bool | GetUseOnlyPopulated () |
void | SetAppendFlag (const bool appendFlag) |
bool | GetAppendFlag () |
void | SetFieldSeparator (const std::string &fieldSeparator) |
void | SetRowSeparator (const std::string &rowSeparator) |
std::string | GetCommandTerm () |
std::string | GetFieldSeparator () |
std::string | GetRowSeparator () |
virtual void | GetStart (std::string &start) |
virtual void | WriteSchemaStart (std::ostream &io) |
void | WriteDeleteTable (std::ostream &io, const std::string &table, const std::string &where, const std::string &what) |
virtual void | DropTableSql (std::ostream &io, const std::string &tableNameDb) |
virtual const std::string & | GetExec () |
virtual const std::string & | GetExecOption () |
virtual const std::string & | GetUserOption () |
virtual const std::string & | GetPassOption () |
virtual const std::string & | GetEnvDbUser () |
virtual const std::string & | GetEnvDbPass () |
virtual const std::string & | GetConnect () |
virtual const std::string & | GetTerminate () |
virtual const std::string & | GetDbCommand () |
virtual void | WriteLoad (std::ostream &io) |
const std::string & | GetDataLoadingFileName () |
virtual void | WriteLoadingStart (std::ostream &io) |
virtual void | WriteLoadingEnd (std::ostream &io) |
virtual void | WriteLoadingTable (std::ostream &io, const std::string &tableName, const std::string &path) |
virtual void | WritePrint (std::ostream &io, const std::string &tableNameDb) |
virtual void | GetChar (std::string &dType, const unsigned int width) |
virtual void | GetFloat (std::string &dType) |
virtual void | GetText (std::string &dType, const unsigned int width) |
virtual void | GetDate (std::string &dType) |
virtual void | WriteNull (std::ostream &io, const int iNull, const unsigned int curr, const unsigned int attSize) |
virtual void | WriteTableIndex (std::ostream &io, const std::string &tableNameDb, const vector< std::string > &indexList) |
const std::string & | GetBcpStringDelimiter () |
virtual void | WriteBcpDoubleQuotes (std::ostream &io) |
virtual void | WriteNewLine (std::ostream &io, bool special=false) |
bool | IsFirstTextNewLineSpecial () |
virtual void | ConvertDate (std::string &dbDate, const std::string &cifDate) |
virtual void | ConvertTimestamp (std::string &dbTimestamp, const std::string &cifTimestamp) |
virtual void | GetDateAndTime (std::string &dateAndTime) |
Public Attributes | |
SchemaMap & | _schemaMapping |
Static Public Attributes | |
static const std::string | DB_DEFAULT_NAME = "msd1" |
Protected Attributes | |
bool | _useOnlyPopulated |
bool | _appendFlag |
std::string | _fieldSeparator |
std::string | _rowSeparator |
std::string | _cmdTerm |
std::string | _dbName |
std::string | _exec |
std::string | _execOption |
std::string | _userOption |
std::string | _passOption |
std::string | _connect |
std::string | _terminate |
std::string | _dbCommand |
std::string | _envDbUser |
std::string | _envDbPass |
std::string | _dataLoadingFileName |
std::string | _bcpStringDelimiter |
bool | _firstTextNewLineSpecial |
Static Private Attributes | |
static const std::string | _SCRIPT_LOADING_FILE = "DB_LOADER_LOAD_COMMANDS.csh" |
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 | ( | SchemaMap & | schemaMapping, | |
const std::string & | dbName = DB_DEFAULT_NAME | |||
) |
Db::~Db | ( | ) | [virtual] |
virtual void Db::ConvertDate | ( | std::string & | dbDate, | |
const std::string & | cifDate | |||
) | [virtual] |
virtual void Db::ConvertTimestamp | ( | std::string & | dbTimestamp, | |
const std::string & | cifTimestamp | |||
) | [virtual] |
virtual void Db::DropTableSql | ( | std::ostream & | io, | |
const std::string & | tableNameDb | |||
) | [virtual] |
bool Db::GetAppendFlag | ( | ) |
const string & Db::GetBcpStringDelimiter | ( | ) |
virtual void Db::GetChar | ( | std::string & | dType, | |
const unsigned int | width | |||
) | [virtual] |
string Db::GetCommandTerm | ( | ) |
const string & Db::GetConnect | ( | ) | [virtual] |
const string & Db::GetDataLoadingFileName | ( | ) |
virtual void Db::GetDate | ( | std::string & | dType | ) | [virtual] |
virtual void Db::GetDateAndTime | ( | std::string & | dateAndTime | ) | [virtual] |
const string & Db::GetDbCommand | ( | ) | [virtual] |
const string & Db::GetEnvDbPass | ( | ) | [virtual] |
const string & Db::GetEnvDbUser | ( | ) | [virtual] |
const string & Db::GetExec | ( | ) | [virtual] |
const string & Db::GetExecOption | ( | ) | [virtual] |
string Db::GetFieldSeparator | ( | ) |
virtual void Db::GetFloat | ( | std::string & | dType | ) | [virtual] |
const string & Db::GetPassOption | ( | ) | [virtual] |
string Db::GetRowSeparator | ( | ) |
virtual void Db::GetStart | ( | std::string & | start | ) | [virtual] |
const string & Db::GetTerminate | ( | ) | [virtual] |
virtual void Db::GetText | ( | std::string & | dType, | |
const unsigned int | width | |||
) | [virtual] |
bool Db::GetUseOnlyPopulated | ( | ) |
const string & Db::GetUserOption | ( | ) | [virtual] |
bool Db::IsFirstTextNewLineSpecial | ( | ) |
void Db::SetAppendFlag | ( | const bool | appendFlag | ) |
void Db::SetFieldSeparator | ( | const std::string & | fieldSeparator | ) |
void Db::SetRowSeparator | ( | const std::string & | rowSeparator | ) |
void Db::SetUseOnlyPopulated | ( | bool | mode = true |
) |
virtual void Db::WriteBcpDoubleQuotes | ( | std::ostream & | io | ) | [virtual] |
Reimplemented in DbDb2.
void Db::WriteDeleteTable | ( | std::ostream & | io, | |
const std::string & | table, | |||
const std::string & | where, | |||
const std::string & | what | |||
) |
virtual void Db::WriteLoad | ( | std::ostream & | io | ) | [virtual] |
Reimplemented in DbMySql.
virtual void Db::WriteLoadingEnd | ( | std::ostream & | io | ) | [virtual] |
Reimplemented in DbDb2.
virtual void Db::WriteLoadingStart | ( | std::ostream & | io | ) | [virtual] |
virtual void Db::WriteLoadingTable | ( | std::ostream & | io, | |
const std::string & | tableName, | |||
const std::string & | path | |||
) | [virtual] |
virtual void Db::WriteNewLine | ( | std::ostream & | io, | |
bool | special = false | |||
) | [virtual] |
virtual void Db::WriteNull | ( | std::ostream & | io, | |
const int | iNull, | |||
const unsigned int | curr, | |||
const unsigned int | attSize | |||
) | [virtual] |
virtual void Db::WritePrint | ( | std::ostream & | io, | |
const std::string & | tableNameDb | |||
) | [virtual] |
virtual void Db::WriteSchemaStart | ( | std::ostream & | io | ) | [virtual] |
virtual void Db::WriteTableIndex | ( | std::ostream & | io, | |
const std::string & | tableNameDb, | |||
const vector< std::string > & | indexList | |||
) | [virtual] |
bool Db::_appendFlag [protected] |
std::string Db::_bcpStringDelimiter [protected] |
std::string Db::_cmdTerm [protected] |
std::string Db::_connect [protected] |
std::string Db::_dataLoadingFileName [protected] |
std::string Db::_dbCommand [protected] |
std::string Db::_dbName [protected] |
std::string Db::_envDbPass [protected] |
std::string Db::_envDbUser [protected] |
std::string Db::_exec [protected] |
std::string Db::_execOption [protected] |
std::string Db::_fieldSeparator [protected] |
bool Db::_firstTextNewLineSpecial [protected] |
std::string Db::_passOption [protected] |
std::string Db::_rowSeparator [protected] |
SchemaMap& Db::_schemaMapping |
const string Db::_SCRIPT_LOADING_FILE = "DB_LOADER_LOAD_COMMANDS.csh" [static, private] |
std::string Db::_terminate [protected] |
bool Db::_useOnlyPopulated [protected] |
std::string Db::_userOption [protected] |
const string Db::DB_DEFAULT_NAME = "msd1" [static] |