#include <CifSchemaMap.h>
Inherited by BcpOutput, SqlOutput, and XmlOutput.
Inheritance diagram for DbOutput:
Public Member Functions | |
DbOutput (Db &db) | |
virtual | ~DbOutput () |
virtual void | WriteSchema (const string &path=String::Empty) |
virtual void | WriteDataLoadingScripts (const string &path=String::Empty) |
virtual void | WriteData (Block &block, const string &path=String::Empty) |
void | SetInputFile (const string &inpFile) |
const string & | GetCommandScriptName () |
Public Attributes | |
Db & | _db |
Protected Member Functions | |
void | WriteDbExec (ostream &io, const string &fileName, const unsigned int indentLevel=0) |
void | WriteDbExecOnly (ostream &io, const string &fileName, const unsigned int indentLevel=1) |
void | WriteHeader (ostream &io) |
void | _FormatNumericData (ostream &io, const string &cs) |
void | _FormatStringData (ostream &io, const string &cs, unsigned int maxWidth) |
void | _FormatTextData (ostream &io, const string &cs) |
void | _FormatDateData (ostream &io, const string &cs, unsigned int maxWidth) |
void | _FormatData (ostream &io, const string &cs, ATTRIBINFO &attribInfo, const bool noRevise) |
bool | IsSpecialChar (const char &character) |
bool | IsSpecialDateChar (const char &character) |
virtual void | WriteEmptyNumeric (ostream &io) |
virtual void | WriteEmptyString (ostream &io) |
virtual void | WriteSpecialChar (ostream &io, const char &specChar) |
virtual void | WriteEmptyDate (ostream &io) |
virtual void | WriteSpecialDateChar (ostream &io, const char &specDateChar) |
virtual bool | IsFirstTextNewLineSpecial () |
virtual void | WriteNewLine (ostream &io, bool special=false) |
virtual void | GetTableStart (string &tableStart, const string &tableName) |
virtual void | GetTableEnd (string &tableEnd) |
const string & | GetItemSeparator () |
const string & | GetRowSeparator () |
virtual void | _WriteTable (ostream &io, ISTable *tIn, bool noRevise=false) |
void | GetMasterIndexAttribValue (string &masterIndexAttribValue, Block &block, const string &masterIndexAttribName, const vector< string > &tableNames) |
Protected Attributes | |
string | _SCHEMA_FILE |
string | _INPUT_FILE |
string | _stringDelimiter |
vector< char > | _specialChars |
string | _dateDelimiter |
vector< char > | _specialDateChars |
string | _itemSeparator |
string | _rowSeparator |
Static Protected Attributes | |
static const string | _DATA_LOADING_SCRIPT |
Static Private Member Functions | |
static void | _FormatStringDataSql (ostream &io, const string &cs, unsigned int maxWidth) |
This class encapsulates general characteristics of each kind of output. It contains virtual methods for generating the schema, data and loading scripts.
DbOutput::DbOutput | ( | Db & | db | ) |
DbOutput::~DbOutput | ( | ) | [virtual] |
void DbOutput::WriteSchema | ( | const string & | path = String::Empty |
) | [virtual] |
void DbOutput::WriteDataLoadingScripts | ( | const string & | path = String::Empty |
) | [virtual] |
void DbOutput::WriteData | ( | Block & | block, | |
const string & | path = String::Empty | |||
) | [virtual] |
void DbOutput::SetInputFile | ( | const string & | inpFile | ) |
const string & DbOutput::GetCommandScriptName | ( | ) |
void DbOutput::WriteDbExec | ( | ostream & | io, | |
const string & | fileName, | |||
const unsigned int | indentLevel = 0 | |||
) | [protected] |
void DbOutput::WriteDbExecOnly | ( | ostream & | io, | |
const string & | fileName, | |||
const unsigned int | indentLevel = 1 | |||
) | [protected] |
void DbOutput::WriteHeader | ( | ostream & | io | ) | [protected] |
void DbOutput::_FormatNumericData | ( | ostream & | io, | |
const string & | cs | |||
) | [protected] |
void DbOutput::_FormatStringData | ( | ostream & | io, | |
const string & | cs, | |||
unsigned int | maxWidth | |||
) | [protected] |
void DbOutput::_FormatTextData | ( | ostream & | io, | |
const string & | cs | |||
) | [protected] |
void DbOutput::_FormatDateData | ( | ostream & | io, | |
const string & | cs, | |||
unsigned int | maxWidth | |||
) | [protected] |
void DbOutput::_FormatData | ( | ostream & | io, | |
const string & | cs, | |||
ATTRIBINFO & | attribInfo, | |||
const bool | noRevise | |||
) | [protected] |
bool DbOutput::IsSpecialChar | ( | const char & | character | ) | [protected] |
bool DbOutput::IsSpecialDateChar | ( | const char & | character | ) | [protected] |
void DbOutput::WriteEmptyNumeric | ( | ostream & | io | ) | [protected, virtual] |
Reimplemented in SqlOutput.
void DbOutput::WriteEmptyString | ( | ostream & | io | ) | [protected, virtual] |
void DbOutput::WriteSpecialChar | ( | ostream & | io, | |
const char & | specChar | |||
) | [protected, virtual] |
Reimplemented in XmlOutput.
void DbOutput::WriteEmptyDate | ( | ostream & | io | ) | [protected, virtual] |
Reimplemented in SqlOutput.
void DbOutput::WriteSpecialDateChar | ( | ostream & | io, | |
const char & | specDateChar | |||
) | [protected, virtual] |
Reimplemented in BcpOutput.
bool DbOutput::IsFirstTextNewLineSpecial | ( | ) | [protected, virtual] |
Reimplemented in SqlOutput.
void DbOutput::WriteNewLine | ( | ostream & | io, | |
bool | special = false | |||
) | [protected, virtual] |
Reimplemented in SqlOutput.
void DbOutput::GetTableStart | ( | string & | tableStart, | |
const string & | tableName | |||
) | [protected, virtual] |
Reimplemented in SqlOutput.
void DbOutput::GetTableEnd | ( | string & | tableEnd | ) | [protected, virtual] |
Reimplemented in SqlOutput.
const string & DbOutput::GetItemSeparator | ( | ) | [protected] |
const string & DbOutput::GetRowSeparator | ( | ) | [protected] |
void DbOutput::_WriteTable | ( | ostream & | io, | |
ISTable * | tIn, | |||
bool | noRevise = false | |||
) | [protected, virtual] |
Reimplemented in XmlOutput.
void DbOutput::GetMasterIndexAttribValue | ( | string & | masterIndexAttribValue, | |
Block & | block, | |||
const string & | masterIndexAttribName, | |||
const vector< string > & | tableNames | |||
) | [protected] |
void DbOutput::_FormatStringDataSql | ( | ostream & | io, | |
const string & | cs, | |||
unsigned int | maxWidth | |||
) | [static, private] |
const string DbOutput::_DATA_LOADING_SCRIPT [static, protected] |
string DbOutput::_SCHEMA_FILE [protected] |
string DbOutput::_INPUT_FILE [protected] |
string DbOutput::_stringDelimiter [protected] |
vector<char> DbOutput::_specialChars [protected] |
string DbOutput::_dateDelimiter [protected] |
vector<char> DbOutput::_specialDateChars [protected] |
string DbOutput::_itemSeparator [protected] |
string DbOutput::_rowSeparator [protected] |