SQL Relay C++ API
Public Member Functions | List of all members
sqlrexportdomnode Class Reference

#include <sqlrexportdomnode.h>

Inherits sqlrexport.

Inherited by sqlrexportcsvjsondomnode [virtual].

Public Member Functions

 sqlrexportdomnode ()
 
virtual ~sqlrexportdomnode ()
 
void setDomNode (domnode *dn)
 
domnode * getDomNode ()
 
void setColumnsDomNode (domnode *dn)
 
domnode * getColumnsDomNode ()
 
void setCurrentColumnDomNode (domnode *dn)
 
domnode * getCurrentColumnDomNode ()
 
void setRowsDomNode (domnode *dn)
 
domnode * getRowsDomNode ()
 
void setCurrentRowDomNode (domnode *dn)
 
domnode * getCurrentRowDomNode ()
 
void setCurrentFieldDomNode (domnode *dn)
 
domnode * getCurrentFieldDomNode ()
 
virtual bool exportData ()
 
- Public Member Functions inherited from sqlrexport
 sqlrexport ()
 
virtual ~sqlrexport ()
 
void setSqlrConnection (sqlrconnection *sqlrcon)
 
void setSqlrCursor (sqlrcursor *sqlrcur)
 
sqlrconnectiongetSqlrConnection ()
 
sqlrcursorgetSqlrCursor ()
 
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 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)
 

Detailed Description

The sqlrexportdomnode class provides a base class for child class that wish to implement export of data from a database, vis SQL Relay, to a domnode. It provides various common methods. Each child class should implement the exportData() method.

Constructor & Destructor Documentation

◆ sqlrexportdomnode()

sqlrexportdomnode::sqlrexportdomnode ( )

Creates an instance of the sqlrexportdomnode class.

◆ ~sqlrexportdomnode()

virtual sqlrexportdomnode::~sqlrexportdomnode ( )
virtual

Destroys this instance of the sqlrexportdomnode class.

Member Function Documentation

◆ exportData()

virtual bool sqlrexportdomnode::exportData ( )
virtual

Exports the result set of the cursor currently in use as set by the most recent call to setSqlrCursor() to the domnode set by the most recent call to setDomNode().

Returns true on success and false if an error occurred.

Note that the default implementation of this method just return true. Child classes that support export to a domnode should override this method.

Reimplemented from sqlrexport.

Reimplemented in sqlrexportcsvjsondomnode.

◆ getColumnsDomNode()

domnode * sqlrexportdomnode::getColumnsDomNode ( )

Gets the domnode that columns are being written to.

May be called by implementations of exportData() or by implementations of the *Start/End() methods.

◆ getCurrentColumnDomNode()

domnode * sqlrexportdomnode::getCurrentColumnDomNode ( )

Gets the domnode that the current column is being written to.

May be called by implementations of exportData()or by implementations of the *Start/End() methods.

◆ getCurrentFieldDomNode()

domnode * sqlrexportdomnode::getCurrentFieldDomNode ( )

Gets the domnode that the current field is being written to.

May be called by implementations of exportData() or by implementations of the *Start/End() methods.

◆ getCurrentRowDomNode()

domnode * sqlrexportdomnode::getCurrentRowDomNode ( )

Gets the domnode that the current row is being written to.

May be called by implementations of exportData()or by implementations of the *Start/End() methods.

◆ getDomNode()

domnode * sqlrexportdomnode::getDomNode ( )

Gets the top-level domnode.

May be called by implementations of exportData() or by implementations of the *Start/End() methods.

◆ getRowsDomNode()

domnode * sqlrexportdomnode::getRowsDomNode ( )

Gets the domnode that rows are being written to.

May be called by implementations of exportData() or by implementations of the *Start/End() methods.

◆ setColumnsDomNode()

void sqlrexportdomnode::setColumnsDomNode ( domnode * dn)

Set the domnode that columns will be written to.

Should be called by implementations of exportData(). Not commonly called by implementations of the *Start/End() methods.

◆ setCurrentColumnDomNode()

void sqlrexportdomnode::setCurrentColumnDomNode ( domnode * dn)

Sets the domnode that the current column will be written to.

Should be called by implementations of exportData(). Not commonly called by implementations of the *Start/End() methods.

◆ setCurrentFieldDomNode()

void sqlrexportdomnode::setCurrentFieldDomNode ( domnode * dn)

Sets the domnode that the current field will be written to.

Should be called by implementations of exportData(). Not commonly called by implementations of the *Start/End() methods.

◆ setCurrentRowDomNode()

void sqlrexportdomnode::setCurrentRowDomNode ( domnode * dn)

Sets the domnode that the current row will be written to.

Should be called by implementations of exportData(). Not commonly called by implementations of the *Start/End() methods.

◆ setDomNode()

void sqlrexportdomnode::setDomNode ( domnode * dn)

Sets the top-level domnode that data will be exported to.

Should be called by implementations of exportData(). Not commonly called by implementations of the *Start/End() methods.

◆ setRowsDomNode()

void sqlrexportdomnode::setRowsDomNode ( domnode * dn)

Sets the domnode that rows are being written to.

Should be called by implementations of exportData(). Not commonly called by implementations of the *Start/End() methods.