SQL Relay C++ API
|
#include <sqlrexportcsv.h>
Inherits sqlrexportfile.
Public Member Functions | |
sqlrexportcsv () | |
virtual | ~sqlrexportcsv () |
virtual bool | exportData () |
Public Member Functions inherited from sqlrexportfile | |
sqlrexportfile () | |
virtual | ~sqlrexportfile () |
void | setFileName (const char *filename) |
const char * | getFileName () |
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 () |
Additional Inherited Members | |
Protected Member Functions inherited from sqlrexportfile | |
void | setFileDescriptor (filedescriptor *fd) |
filedescriptor * | getFileDescriptor () |
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 sqlrexportcsv class implements sqlrexport for CSV files.
sqlrexportcsv::sqlrexportcsv | ( | ) |
Creates an instance of the sqlrexportcsv class.
|
virtual |
Destroys this instance of the sqlrexportcsv class.
|
virtual |
Exports the result set of the cursor currently in use as set by the most recent call to setSqlrCursor() to the file set by the most recent call to setFileName(), or to standard output if setFileName() was never called, or if setFileName(NULL) was called.
The following result set:
0,0.0,field00,field01 1,1.1,field10,field11
would be exported as:
"col1","col2","col3","col4" 0,0.0,"field00","field01" 1,1.1,"field10","field11"
Returns true on success and false if an error occurred.
Reimplemented from sqlrexportfile.