SQL Relay C++ API
|
#include <sqlrexporttable.h>
Inherits sqlrexport.
Public Member Functions | |
sqlrexporttable () | |
virtual | ~sqlrexporttable () |
void | setExportSqlrConnection (sqlrconnection *exportcon) |
sqlrconnection * | getExportSqlrConnection () |
void | setExportSqlrCursor (sqlrcursor *exportcur) |
sqlrcursor * | getExportSqlrCursor () |
void | setCommitCount (uint64_t commitcount) |
uint64_t | getCommitCount () |
virtual bool | exportData () |
Public Member Functions inherited from sqlrexport | |
sqlrexport () | |
virtual | ~sqlrexport () |
void | setSqlrConnection (sqlrconnection *sqlrcon) |
void | setSqlrCursor (sqlrcursor *sqlrcur) |
sqlrconnection * | getSqlrConnection () |
sqlrcursor * | getSqlrCursor () |
void | setTable (const char *table) |
const char * | getTable () |
void | setExcludeColumns (bool excludecolumns) |
bool | getExcludeColumns () |
void | setColumnsToExclude (const char *const *columnstoexclude) |
const char *const * | getColumnsToExclude () |
void | setLogger (logger *lg) |
logger * | getLogger () |
void | setCoarseLogLevel (uint8_t coarseloglevel) |
uint8_t | getCoarseLogLevel () |
void | setFineLogLevel (uint8_t fineloglevel) |
uint8_t | getFineLogLevel () |
void | setLogIndent (uint32_t logindent) |
uint32_t | getLogIndent () |
void | setLogErrors (bool logerrors) |
bool | getLogErrors () |
uint64_t | getExportedRowCount () |
Protected Member Functions | |
stringbuffer * | getInsertQueryBuffer () |
Protected Member Functions inherited from sqlrexport | |
virtual bool | exportStart () |
virtual bool | columnsStart () |
virtual bool | columnStart () |
virtual bool | columnEnd () |
virtual bool | columnsEnd () |
virtual bool | rowsStart () |
virtual bool | rowStart () |
virtual bool | fieldStart () |
virtual bool | fieldEnd () |
virtual bool | rowEnd () |
virtual bool | rowsEnd () |
virtual bool | beginStart () |
virtual bool | beginEnd () |
virtual bool | commitStart () |
virtual bool | commitEnd () |
virtual bool | error (int64_t errornumber, const char *errormessage) |
virtual bool | exportEnd () |
void | setExcludeRow (bool excluderow) |
bool | getExcludeRow () |
void | setCurrentRow (uint64_t currentrow) |
uint64_t | getCurrentRow () |
void | setCurrentColumn (uint32_t currentcol) |
uint32_t | getCurrentColumn () |
void | setCurrentColumnName (const char *currentcolname) |
const char * | getCurrentColumnName () |
void | setCurrentField (const char *currentfield) |
const char * | getCurrentField () |
void | setIsNumericColumn (uint64_t index, bool numeric) |
bool | getIsNumericColumn (uint64_t index) |
void | clearAreNumericColumns () |
void | setExportedRowCount (uint64_t exportedrowcount) |
The sqlrexporttable class implements sqlrexport for database tables.
sqlrexporttable::sqlrexporttable | ( | ) |
Creates an instance of the sqlrexporttable class.
|
virtual |
Destroys this instance of the sqlrexporttable class.
|
virtual |
Exports the result set of the cursor currently in use as set by the most recent call to setSqlrCursor() to the database table set by the most recent call to setTable() using the sqlrconnection and sqlrcuror set by the most recent calls to setExportSqlrConnection() and setExportSqlrCursor(). If setCommitCount() was called with a non-zero value then a commit will be called after every "commitcount" rows is inserted. No commit will be called if setCommitCount() was never called, or if setCommitCount(0) was called.
Returns true on success and false if an error occurred.
Reimplemented from sqlrexport.
uint64_t sqlrexporttable::getCommitCount | ( | ) |
Gets the commit count.
sqlrconnection * sqlrexporttable::getExportSqlrConnection | ( | ) |
Gets the instance of sqlrconnection that this instance will use to export data to the table.
sqlrcursor * sqlrexporttable::getExportSqlrCursor | ( | ) |
Gets the instance of sqlrcursor that this instance will use to export data to the table.
|
protected |
Gets the buffer that the insert query is written when exporting data to a table.
Should be called by implementations of exportData(). May also be called by implementations of the *Start/End() methods.
void sqlrexporttable::setCommitCount | ( | uint64_t | commitcount | ) |
Sets the commit count.
void sqlrexporttable::setExportSqlrConnection | ( | sqlrconnection * | exportcon | ) |
Sets the instance of sqlrconnection that this instance will use to export data to the table.
void sqlrexporttable::setExportSqlrCursor | ( | sqlrcursor * | exportcur | ) |
Sets the instance of sqlrcursor that this instance will use to export data to the table.