SqlOutput Class Reference

SQL output class. More...

#include <CifSchemaMap.h>

Inherits DbOutput.

Inheritance diagram for SqlOutput:

Inheritance graph
[legend]
Collaboration diagram for SqlOutput:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SqlOutput (Db &db)
virtual ~SqlOutput ()
void WriteSchema (const string &path=std::string())
void WriteDataLoadingScripts (const string &path=std::string())
void WriteData (Block &block, const string &path=std::string())

Protected Member Functions

void WriteEmptyNumeric (std::ostream &io)
bool IsFirstTextNewLineSpecial ()
void WriteNewLine (std::ostream &io, bool special=false)
void GetTableStart (string &tableStart, const string &tableName)
void GetTableEnd (string &tableEnd)

Private Member Functions

void WriteSqlScriptSchemaInfo (std::ostream &io)
void WriteDataLoadingScript (const string &path)
void CreateTableSql (std::ostream &io, const string &tableName)
void WriteAuxTables (std::ostream &io, ISTable *infoP, const vector< string > &tableNames)
void WriteEmptyString (std::ostream &io)
void WriteEmptyDate (std::ostream &io)

Static Private Attributes

static const unsigned int _MAX_SQL_NAME_LENGTH = 60
static const string _SCHEMA_LOADING_SCRIPT
static const string _SCHEMA_DELETE_FILE = "DB_LOADER_SCHEMA_DROP.sql"
static const string _DATA_FILE = "DB_LOADER.sql"

Detailed Description

SQL output class.

This class represents an SQL output. It re-implements methods for schema, data and loading scripts generation.


Constructor & Destructor Documentation

SqlOutput::SqlOutput ( Db db  ) 

SqlOutput::~SqlOutput (  )  [virtual]


Member Function Documentation

void SqlOutput::CreateTableSql ( std::ostream &  io,
const string &  tableName 
) [private]

void SqlOutput::GetTableEnd ( string &  tableEnd  )  [protected]

void SqlOutput::GetTableStart ( string &  tableStart,
const string &  tableName 
) [protected]

bool SqlOutput::IsFirstTextNewLineSpecial (  )  [protected, virtual]

Reimplemented from DbOutput.

void SqlOutput::WriteAuxTables ( std::ostream &  io,
ISTable *  infoP,
const vector< string > &  tableNames 
) [private]

void SqlOutput::WriteData ( Block &  block,
const string &  path = std::string() 
)

void SqlOutput::WriteDataLoadingScript ( const string &  path  )  [private]

void SqlOutput::WriteDataLoadingScripts ( const string &  path = std::string()  ) 

void SqlOutput::WriteEmptyDate ( std::ostream &  io  )  [private, virtual]

Reimplemented from DbOutput.

void SqlOutput::WriteEmptyNumeric ( std::ostream &  io  )  [protected, virtual]

Reimplemented from DbOutput.

void SqlOutput::WriteEmptyString ( std::ostream &  io  )  [private, virtual]

Reimplemented from DbOutput.

void SqlOutput::WriteNewLine ( std::ostream &  io,
bool  special = false 
) [protected, virtual]

Reimplemented from DbOutput.

void SqlOutput::WriteSchema ( const string &  path = std::string()  ) 

void SqlOutput::WriteSqlScriptSchemaInfo ( std::ostream &  io  )  [private]


Member Data Documentation

const string SqlOutput::_DATA_FILE = "DB_LOADER.sql" [static, private]

const unsigned int SqlOutput::_MAX_SQL_NAME_LENGTH = 60 [static, private]

const string SqlOutput::_SCHEMA_DELETE_FILE = "DB_LOADER_SCHEMA_DROP.sql" [static, private]

const string SqlOutput::_SCHEMA_LOADING_SCRIPT [static, private]

Initial value:

  "DB_LOADER_SCHEMA_COMMANDS.csh"


The documentation for this class was generated from the following files:
Generated on Thu Oct 6 10:15:58 2011 for db-loader-v4.1.0 by  doxygen 1.4.7