#include <CifSchemaMap.h>
Inherits DbOutput.
Inheritance diagram for SqlOutput:
Public Member Functions | |
SqlOutput (Db &db) | |
virtual | ~SqlOutput () |
void | WriteSchema (const string &path=String::Empty) |
void | WriteData (Block &block, const string &path=String::Empty) |
void | WriteDataLoadingScripts (const string &path=String::Empty) |
Protected Member Functions | |
void | WriteEmptyNumeric (ostream &io) |
bool | IsFirstTextNewLineSpecial () |
void | WriteNewLine (ostream &io, bool special=false) |
void | GetTableStart (string &tableStart, const string &tableName) |
void | GetTableEnd (string &tableEnd) |
Private Member Functions | |
void | WriteSqlScriptSchemaInfo (ostream &io) |
void | WriteCommandScript (const string &path) |
void | CreateTableSql (ostream &io, const string &tableName) |
void | WriteAuxTables (ostream &io, ISTable *infoP, const vector< string > &tableNames) |
void | WriteEmptyString (ostream &io) |
void | WriteEmptyDate (ostream &io) |
Static Private Attributes | |
static const unsigned int | _MAX_SQL_NAME_LENGTH = 60 |
static const string | _SCHEMA_COMMAND_FILE |
static const string | _SCHEMA_SQL_DROP_FILE |
static const string | _SCHEMA_SQL_FILE |
static const string | _SQL_FILE |
This class represents an SQL output. It re-implements methods for schema, data and loading scripts generation.
SqlOutput::SqlOutput | ( | Db & | db | ) |
SqlOutput::~SqlOutput | ( | ) | [virtual] |
void SqlOutput::WriteSchema | ( | const string & | path = String::Empty |
) | [virtual] |
Reimplemented from DbOutput.
void SqlOutput::WriteData | ( | Block & | block, | |
const string & | path = String::Empty | |||
) | [virtual] |
Reimplemented from DbOutput.
void SqlOutput::WriteDataLoadingScripts | ( | const string & | path = String::Empty |
) | [virtual] |
Reimplemented from DbOutput.
void SqlOutput::WriteEmptyNumeric | ( | ostream & | io | ) | [protected, virtual] |
Reimplemented from DbOutput.
bool SqlOutput::IsFirstTextNewLineSpecial | ( | ) | [protected, virtual] |
Reimplemented from DbOutput.
void SqlOutput::WriteNewLine | ( | ostream & | io, | |
bool | special = false | |||
) | [protected, virtual] |
Reimplemented from DbOutput.
void SqlOutput::GetTableStart | ( | string & | tableStart, | |
const string & | tableName | |||
) | [protected, virtual] |
Reimplemented from DbOutput.
void SqlOutput::GetTableEnd | ( | string & | tableEnd | ) | [protected, virtual] |
Reimplemented from DbOutput.
void SqlOutput::WriteSqlScriptSchemaInfo | ( | ostream & | io | ) | [private] |
void SqlOutput::WriteCommandScript | ( | const string & | path | ) | [private] |
void SqlOutput::CreateTableSql | ( | ostream & | io, | |
const string & | tableName | |||
) | [private] |
void SqlOutput::WriteAuxTables | ( | ostream & | io, | |
ISTable * | infoP, | |||
const vector< string > & | tableNames | |||
) | [private] |
void SqlOutput::WriteEmptyString | ( | ostream & | io | ) | [private, virtual] |
Reimplemented from DbOutput.
void SqlOutput::WriteEmptyDate | ( | ostream & | io | ) | [private, virtual] |
Reimplemented from DbOutput.
const unsigned int SqlOutput::_MAX_SQL_NAME_LENGTH = 60 [static, private] |
const string SqlOutput::_SCHEMA_COMMAND_FILE [static, private] |
const string SqlOutput::_SCHEMA_SQL_DROP_FILE [static, private] |
const string SqlOutput::_SCHEMA_SQL_FILE [static, private] |
const string SqlOutput::_SQL_FILE [static, private] |