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

Inherits object.

Public Member Functions

 sqlrcursor (sqlrconnection *sqlrc)
 
 ~sqlrcursor ()
 
void setResultSetBufferSize (uint64_t rows)
 
uint64_t getResultSetBufferSize ()
 
void dontGetColumnInfo ()
 
void getColumnInfo ()
 
void mixedCaseColumnNames ()
 
void upperCaseColumnNames ()
 
void lowerCaseColumnNames ()
 
void cacheToFile (const char *filename)
 
void setCacheTtl (uint32_t ttl)
 
const char * getCacheFileName ()
 
void cacheOff ()
 
bool getDatabaseList (const char *databases)
 
bool getCatalogList (const char *catalog)
 
bool getSchemaList (const char *schemas)
 
bool getTableTypeList ()
 
bool getTableList (const char *tables)
 
bool getTypeInfoList (const char *type)
 
bool getColumnList (const char *table, const char *columns)
 
bool getPrimaryKeysList (const char *table, const char *columns)
 
bool getKeyAndIndexList (const char *table, const char *qualifier)
 
bool getProcedureList (const char *procedures)
 
bool getProcedureParameterList (const char *procedure, const char *parameters)
 
bool sendQuery (const char *query)
 
bool sendQuery (const char *query, uint32_t length)
 
bool sendFileQuery (const char *path, const char *filename)
 
void prepareQuery (const char *query)
 
void prepareQuery (const char *query, uint32_t length)
 
bool prepareFileQuery (const char *path, const char *filename)
 
void substitution (const char *variable, const char *value)
 
void substitution (const char *variable, int64_t value)
 
void substitution (const char *variable, double value, uint32_t precision, uint32_t scale)
 
void substitutions (const char **variables, const char **values)
 
void substitutions (const char **variables, const int64_t *values)
 
void substitutions (const char **variables, const double *values, const uint32_t *precisions, const uint32_t *scales)
 
void inputBind (const char *variable, const char *value)
 
void inputBind (const char *variable, const char *value, uint32_t valuelength)
 
void inputBind (const char *variable, int64_t value)
 
void inputBind (const char *variable, double value, uint32_t precision, uint32_t scale)
 
void inputBind (const char *variable, int16_t year, int16_t month, int16_t day, int16_t hour, int16_t minute, int16_t second, int32_t microsecond, const char *tz, bool isnegative)
 
void inputBindBlob (const char *variable, const char *value, uint32_t size)
 
void inputBindClob (const char *variable, const char *value, uint32_t size)
 
void inputBinds (const char **variables, const char **values)
 
void inputBinds (const char **variables, const int64_t *values)
 
void inputBinds (const char **variables, const double *values, const uint32_t *precisions, const uint32_t *scales)
 
void defineOutputBindString (const char *variable, uint32_t bufferlength)
 
void defineOutputBindInteger (const char *variable)
 
void defineOutputBindDouble (const char *variable)
 
void defineOutputBindDate (const char *variable)
 
void defineOutputBindBlob (const char *variable)
 
void defineOutputBindClob (const char *variable)
 
void defineOutputBindCursor (const char *variable)
 
void clearBinds ()
 
uint16_t countBindVariables ()
 
void validateBinds ()
 
bool validBind (const char *variable)
 
bool executeQuery ()
 
bool fetchFromBindCursor ()
 
const char * getOutputBindString (const char *variable)
 
int64_t getOutputBindInteger (const char *variable)
 
double getOutputBindDouble (const char *variable)
 
bool getOutputBindDate (const char *variable, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, const char **tz, bool *isnegative)
 
int16_t getOutputBindDateYear (const char *variable)
 
int16_t getOutputBindDateMonth (const char *variable)
 
int16_t getOutputBindDateDay (const char *variable)
 
int16_t getOutputBindDateHour (const char *variable)
 
int16_t getOutputBindDateMinute (const char *variable)
 
int16_t getOutputBindDateSecond (const char *variable)
 
int32_t getOutputBindDateMicrosecond (const char *variable)
 
const char * getOutputBindDateTz (const char *variable)
 
bool getOutputBindDateIsNegative (const char *variable)
 
const char * getOutputBindBlob (const char *variable)
 
const char * getOutputBindClob (const char *variable)
 
uint32_t getOutputBindLength (const char *variable)
 
sqlrcursorgetOutputBindCursor (const char *variable)
 
bool openCachedResultSet (const char *filename)
 
uint32_t colCount ()
 
uint64_t rowCount ()
 
uint64_t totalRows ()
 
uint64_t affectedRows ()
 
uint64_t firstRowIndex ()
 
bool endOfResultSet ()
 
const char * errorMessage ()
 
int64_t errorNumber ()
 
void getNullsAsEmptyStrings ()
 
void getNullsAsNulls ()
 
const char * getField (uint64_t row, uint32_t col)
 
const char * getField (uint64_t row, const char *col)
 
const char * getFieldIgnoringCase (uint64_t row, const char *col)
 
int64_t getFieldAsInteger (uint64_t row, uint32_t col)
 
int64_t getFieldAsInteger (uint64_t row, const char *col)
 
int64_t getFieldAsIntegerIgnoringCase (uint64_t row, const char *col)
 
double getFieldAsDouble (uint64_t row, uint32_t col)
 
double getFieldAsDouble (uint64_t row, const char *col)
 
double getFieldAsDoubleIgnoringCase (uint64_t row, const char *col)
 
bool getFieldAsBoolean (uint64_t row, uint32_t col)
 
bool getFieldAsBoolean (uint64_t row, const char *col)
 
bool getFieldAsBooleanIgnoringCase (uint64_t row, const char *col)
 
bool getFieldAsDate (uint64_t row, uint32_t col, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, bool *isnegative)
 
bool getFieldAsDate (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, bool *isnegative)
 
bool getFieldAsDate (uint64_t row, const char *col, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, bool *isnegative)
 
bool getFieldAsDateIgnoringCase (uint64_t row, const char *col, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, bool *isnegative)
 
bool getFieldAsDate (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, bool *isnegative)
 
bool getFieldAsDateIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, bool *isnegative)
 
int16_t getFieldAsDateYear (uint64_t row, uint32_t col)
 
int16_t getFieldAsDateYear (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateYear (uint64_t row, const char *col)
 
int16_t getFieldAsDateYearIgnoringCase (uint64_t row, const char *col)
 
int16_t getFieldAsDateYear (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateYearIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateMonth (uint64_t row, uint32_t col)
 
int16_t getFieldAsDateMonth (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateMonth (uint64_t row, const char *col)
 
int16_t getFieldAsDateMonthIgnoringCase (uint64_t row, const char *col)
 
int16_t getFieldAsDateMonth (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateMonthIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateDay (uint64_t row, uint32_t col)
 
int16_t getFieldAsDateDay (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateDay (uint64_t row, const char *col)
 
int16_t getFieldAsDateDayIgnoringCase (uint64_t row, const char *col)
 
int16_t getFieldAsDateDay (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateDayIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateHour (uint64_t row, uint32_t col)
 
int16_t getFieldAsDateHour (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateHour (uint64_t row, const char *col)
 
int16_t getFieldAsDateHourIgnoringCase (uint64_t row, const char *col)
 
int16_t getFieldAsDateHour (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateHourIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateMinute (uint64_t row, uint32_t col)
 
int16_t getFieldAsDateMinute (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateMinute (uint64_t row, const char *col)
 
int16_t getFieldAsDateMinuteIgnoringCase (uint64_t row, const char *col)
 
int16_t getFieldAsDateMinute (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateMinuteIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateSecond (uint64_t row, uint32_t col)
 
int16_t getFieldAsDateSecond (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateSecond (uint64_t row, const char *col)
 
int16_t getFieldAsDateSecondIgnoringCase (uint64_t row, const char *col)
 
int16_t getFieldAsDateSecond (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int16_t getFieldAsDateSecondIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int32_t getFieldAsDateMicrosecond (uint64_t row, uint32_t col)
 
int32_t getFieldAsDateMicrosecond (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int32_t getFieldAsDateMicrosecond (uint64_t row, const char *col)
 
int32_t getFieldAsDateMicrosecondIgnoringCase (uint64_t row, const char *col)
 
int32_t getFieldAsDateMicrosecond (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
int32_t getFieldAsDateMicrosecondIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
bool getFieldAsDateIsNegative (uint64_t row, uint32_t col)
 
bool getFieldAsDateIsNegative (uint64_t row, uint32_t col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
bool getFieldAsDateIsNegative (uint64_t row, const char *col)
 
bool getFieldAsDateIsNegativeIgnoringCase (uint64_t row, const char *col)
 
bool getFieldAsDateIsNegative (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
bool getFieldAsDateIsNegativeIgnoringCase (uint64_t row, const char *col, bool ddmm, bool yyyyddmm, const char *datedelimiters)
 
uint32_t getFieldLength (uint64_t row, uint32_t col)
 
uint32_t getFieldLength (uint64_t row, const char *col)
 
const char *const * getRow (uint64_t row)
 
uint32_t * getRowLengths (uint64_t row)
 
const char *const * getColumnNames ()
 
const char * getColumnName (uint32_t col)
 
const char * getColumnType (uint32_t col)
 
const char * getColumnType (const char *col)
 
uint32_t getColumnLength (uint32_t col)
 
uint32_t getColumnLength (const char *col)
 
uint32_t getColumnPrecision (uint32_t col)
 
uint32_t getColumnPrecision (const char *col)
 
uint32_t getColumnScale (uint32_t col)
 
uint32_t getColumnScale (const char *col)
 
bool getColumnIsNullable (uint32_t col)
 
bool getColumnIsNullable (const char *col)
 
bool getColumnIsPrimaryKey (uint32_t col)
 
bool getColumnIsPrimaryKey (const char *col)
 
bool getColumnIsUnique (uint32_t col)
 
bool getColumnIsUnique (const char *col)
 
bool getColumnIsPartOfKey (uint32_t col)
 
bool getColumnIsPartOfKey (const char *col)
 
bool getColumnIsUnsigned (uint32_t col)
 
bool getColumnIsUnsigned (const char *col)
 
bool getColumnIsZeroFilled (uint32_t col)
 
bool getColumnIsZeroFilled (const char *col)
 
bool getColumnIsBinary (uint32_t col)
 
bool getColumnIsBinary (const char *col)
 
bool getColumnIsAutoIncrement (uint32_t col)
 
bool getColumnIsAutoIncrement (const char *col)
 
uint32_t getLongest (uint32_t col)
 
uint32_t getLongest (const char *col)
 
void suspendResultSet ()
 
uint16_t getResultSetId ()
 
bool resumeResultSet (uint16_t id)
 
bool resumeCachedResultSet (uint16_t id, const char *filename)
 
bool nextResultSet ()
 
void closeResultSet ()
 

Constructor & Destructor Documentation

◆ sqlrcursor()

sqlrcursor::sqlrcursor ( sqlrconnection * sqlrc)

Creates a cursor to run queries and fetch result sets using connecton "sqlrc".

◆ ~sqlrcursor()

sqlrcursor::~sqlrcursor ( )

Destroys the cursor and cleans up all associated result set data.

Member Function Documentation

◆ affectedRows()

uint64_t sqlrcursor::affectedRows ( )

Returns the number of rows that were updated, inserted or deleted by the query. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. 0 is returned by databases which don't support this option.

◆ cacheOff()

void sqlrcursor::cacheOff ( )

Sets query caching off.

◆ cacheToFile()

void sqlrcursor::cacheToFile ( const char * filename)

Sets query caching on. Future queries will be cached to the file "filename".

A default time-to-live of 10 minutes is also set.

Note that once cacheToFile() is called, the result sets of all future queries will be cached to that file until another call to cacheToFile() changes which file to cache to or a call to cacheOff() turns off caching.

◆ clearBinds()

void sqlrcursor::clearBinds ( )

Clears all bind variables.

◆ closeResultSet()

void sqlrcursor::closeResultSet ( )

Closes the current result set, if one is open. Data that has been fetched already is still available but no more data may be fetched. Server side resources for the result set are freed as well.

◆ colCount()

uint32_t sqlrcursor::colCount ( )

Returns the number of columns in the current result set.

◆ countBindVariables()

uint16_t sqlrcursor::countBindVariables ( )

Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.

◆ defineOutputBindBlob()

void sqlrcursor::defineOutputBindBlob ( const char * variable)

Defines a binary lob output bind variable.

◆ defineOutputBindClob()

void sqlrcursor::defineOutputBindClob ( const char * variable)

Defines a character lob output bind variable.

◆ defineOutputBindCursor()

void sqlrcursor::defineOutputBindCursor ( const char * variable)

Defines a cursor output bind variable.

◆ defineOutputBindDate()

void sqlrcursor::defineOutputBindDate ( const char * variable)

Defines a date output bind variable.

◆ defineOutputBindDouble()

void sqlrcursor::defineOutputBindDouble ( const char * variable)

Defines a decimal output bind variable.

◆ defineOutputBindInteger()

void sqlrcursor::defineOutputBindInteger ( const char * variable)

Defines an integer output bind variable.

◆ defineOutputBindString()

void sqlrcursor::defineOutputBindString ( const char * variable,
uint32_t bufferlength )

Defines an output bind variable. "bufferlength" bytes will be reserved to store the value.

◆ dontGetColumnInfo()

void sqlrcursor::dontGetColumnInfo ( )

Tells the server not to send any column info (names, types, sizes). If you don't need that info, you should call this method to improve performance.

◆ endOfResultSet()

bool sqlrcursor::endOfResultSet ( )

Returns false if part of the result set is still pending on the server and true if not. This method can only return false if setResultSetBufferSize() has been called with a parameter other than 0.

◆ errorMessage()

const char * sqlrcursor::errorMessage ( )

If a query failed and generated an error, the error message is available here. If the query succeeded then this method returns NULL.

◆ errorNumber()

int64_t sqlrcursor::errorNumber ( )

If a query failed and generated an error, the error number is available here. If there is no error then this method returns 0.

◆ executeQuery()

bool sqlrcursor::executeQuery ( )

Execute the query that was previously prepared and bound.

◆ fetchFromBindCursor()

bool sqlrcursor::fetchFromBindCursor ( )

Fetch from a cursor that was returned as an output bind variable.

◆ firstRowIndex()

uint64_t sqlrcursor::firstRowIndex ( )

Returns the index of the first buffered row. This is useful when buffering only part of the result set at a time.

◆ getCacheFileName()

const char * sqlrcursor::getCacheFileName ( )

Returns the name of the file containing the cached result set.

◆ getCatalogList()

bool sqlrcursor::getCatalogList ( const char * catalog)

Generates a result set containing catalogs that match the pattern "catalog".

The result set will contain the following columns:

  • Database

If "catalog" is empty or NULL then a result set containing all catalogs will be returned.

If SQL Relay doesn't support getting a list of catalogs for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getColumnInfo()

void sqlrcursor::getColumnInfo ( )

Tells the server to send column info.

◆ getColumnIsAutoIncrement() [1/2]

bool sqlrcursor::getColumnIsAutoIncrement ( const char * col)

Returns true if the specified column auto-increments and false otherwise.

◆ getColumnIsAutoIncrement() [2/2]

bool sqlrcursor::getColumnIsAutoIncrement ( uint32_t col)

Returns true if the specified column auto-increments and false otherwise.

◆ getColumnIsBinary() [1/2]

bool sqlrcursor::getColumnIsBinary ( const char * col)

Returns true if the specified column contains binary data and false otherwise.

◆ getColumnIsBinary() [2/2]

bool sqlrcursor::getColumnIsBinary ( uint32_t col)

Returns true if the specified column contains binary data and false otherwise.

◆ getColumnIsNullable() [1/2]

bool sqlrcursor::getColumnIsNullable ( const char * col)

Returns true if the specified column can contain nulls and false otherwise.

◆ getColumnIsNullable() [2/2]

bool sqlrcursor::getColumnIsNullable ( uint32_t col)

Returns true if the specified column can contain nulls and false otherwise.

◆ getColumnIsPartOfKey() [1/2]

bool sqlrcursor::getColumnIsPartOfKey ( const char * col)

Returns true if the specified column is part of a composite key and false otherwise.

◆ getColumnIsPartOfKey() [2/2]

bool sqlrcursor::getColumnIsPartOfKey ( uint32_t col)

Returns true if the specified column is part of a composite key and false otherwise.

◆ getColumnIsPrimaryKey() [1/2]

bool sqlrcursor::getColumnIsPrimaryKey ( const char * col)

Returns true if the specified column is a primary key and false otherwise.

◆ getColumnIsPrimaryKey() [2/2]

bool sqlrcursor::getColumnIsPrimaryKey ( uint32_t col)

Returns true if the specified column is a primary key and false otherwise.

◆ getColumnIsUnique() [1/2]

bool sqlrcursor::getColumnIsUnique ( const char * col)

Returns true if the specified column is unique and false otherwise.

◆ getColumnIsUnique() [2/2]

bool sqlrcursor::getColumnIsUnique ( uint32_t col)

Returns true if the specified column is unique and false otherwise.

◆ getColumnIsUnsigned() [1/2]

bool sqlrcursor::getColumnIsUnsigned ( const char * col)

Returns true if the specified column is an unsigned number and false otherwise.

◆ getColumnIsUnsigned() [2/2]

bool sqlrcursor::getColumnIsUnsigned ( uint32_t col)

Returns true if the specified column is an unsigned number and false otherwise.

◆ getColumnIsZeroFilled() [1/2]

bool sqlrcursor::getColumnIsZeroFilled ( const char * col)

Returns true if the specified column was created with the zero-fill flag and false otherwise.

◆ getColumnIsZeroFilled() [2/2]

bool sqlrcursor::getColumnIsZeroFilled ( uint32_t col)

Returns true if the specified column was created with the zero-fill flag and false otherwise.

◆ getColumnLength() [1/2]

uint32_t sqlrcursor::getColumnLength ( const char * col)

Returns the number of bytes required on the server to store the data for the specified column

◆ getColumnLength() [2/2]

uint32_t sqlrcursor::getColumnLength ( uint32_t col)

Returns the number of bytes required on the server to store the data for the specified column

◆ getColumnList()

bool sqlrcursor::getColumnList ( const char * table,
const char * columns )

Generates a result set containing the columns of "table", which match the pattern "columns".

The result set will contain the following columns:

  • column_name
  • data_type
  • character_maximum_length
  • numeric_precision
  • numeric_scale
  • is_nullable
  • column_key
  • column_default
  • extra

If "columns" is empty or NULL then a list of all columns of "table" will be returned.

If SQL Relay doesn't support getting a list of columns for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getColumnName()

const char * sqlrcursor::getColumnName ( uint32_t col)

Returns the name of the specified column.

◆ getColumnNames()

const char *const * sqlrcursor::getColumnNames ( )

Returns a null terminated array of the column names of the current result set.

◆ getColumnPrecision() [1/2]

uint32_t sqlrcursor::getColumnPrecision ( const char * col)

Returns the precision of the specified column. Precision is the total number of digits in a number. eg: 123.45 has a precision of 5. For non-numeric types, it's the number of characters in the string.

◆ getColumnPrecision() [2/2]

uint32_t sqlrcursor::getColumnPrecision ( uint32_t col)

Returns the precision of the specified column. Precision is the total number of digits in a number. eg: 123.45 has a precision of 5. For non-numeric types, it's the number of characters in the string.

◆ getColumnScale() [1/2]

uint32_t sqlrcursor::getColumnScale ( const char * col)

Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

◆ getColumnScale() [2/2]

uint32_t sqlrcursor::getColumnScale ( uint32_t col)

Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

◆ getColumnType() [1/2]

const char * sqlrcursor::getColumnType ( const char * col)

Returns the type of the specified column.

◆ getColumnType() [2/2]

const char * sqlrcursor::getColumnType ( uint32_t col)

Returns the type of the specified column.

◆ getDatabaseList()

bool sqlrcursor::getDatabaseList ( const char * databases)

Generates a result set containing databases that match the pattern "databases".

The result set will contain the following columns:

  • Database

If "databases" is empty or NULL then a result set containing all databases will be returned.

May actually return a result set of catalogs or schemas, depending on whether the backend database equates "database" with catalog or schema.

See getDatabaseIsSchema().

If SQL Relay doesn't support getting a list of databases for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getField() [1/2]

const char * sqlrcursor::getField ( uint64_t row,
const char * col )

Returns the specified field as a string.

◆ getField() [2/2]

const char * sqlrcursor::getField ( uint64_t row,
uint32_t col )

Returns the specified field as a string.

◆ getFieldAsBoolean() [1/2]

bool sqlrcursor::getFieldAsBoolean ( uint64_t row,
const char * col )

Returns the specified field as a boolean.

◆ getFieldAsBoolean() [2/2]

bool sqlrcursor::getFieldAsBoolean ( uint64_t row,
uint32_t col )

Returns the specified field as a boolean.

◆ getFieldAsBooleanIgnoringCase()

bool sqlrcursor::getFieldAsBooleanIgnoringCase ( uint64_t row,
const char * col )

Returns the specified field as a boolean, ignoring the case of "col".

◆ getFieldAsDate() [1/4]

bool sqlrcursor::getFieldAsDate ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
bool * isnegative )

Interprets the specified field as a date and populates its broken-down parts.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

Returns true if it was able to interpret the field as a date, and false otherwise.

◆ getFieldAsDate() [2/4]

bool sqlrcursor::getFieldAsDate ( uint64_t row,
const char * col,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
bool * isnegative )

Interprets the specified field as a date and populates its broken-down parts.

Returns true if it was able to interpret the field as a date, and false otherwise.

◆ getFieldAsDate() [3/4]

bool sqlrcursor::getFieldAsDate ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
bool * isnegative )

Interprets the specified field as a date and populates its broken-down parts.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

Returns true if it was able to interpret the field as a date, and false otherwise.

◆ getFieldAsDate() [4/4]

bool sqlrcursor::getFieldAsDate ( uint64_t row,
uint32_t col,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
bool * isnegative )

Interprets the specified field as a date and populates its broken-down parts.

Returns true if it was able to interpret the field as a date, and false otherwise.

◆ getFieldAsDateDay() [1/4]

int16_t sqlrcursor::getFieldAsDateDay ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the day component.

◆ getFieldAsDateDay() [2/4]

int16_t sqlrcursor::getFieldAsDateDay ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the day component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateDay() [3/4]

int16_t sqlrcursor::getFieldAsDateDay ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns the day component.

◆ getFieldAsDateDay() [4/4]

int16_t sqlrcursor::getFieldAsDateDay ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the day component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateDayIgnoringCase() [1/2]

int16_t sqlrcursor::getFieldAsDateDayIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the day component, ignoring the case of "col".

◆ getFieldAsDateDayIgnoringCase() [2/2]

int16_t sqlrcursor::getFieldAsDateDayIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the day component, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateHour() [1/4]

int16_t sqlrcursor::getFieldAsDateHour ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the hour component.

◆ getFieldAsDateHour() [2/4]

int16_t sqlrcursor::getFieldAsDateHour ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the hour component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateHour() [3/4]

int16_t sqlrcursor::getFieldAsDateHour ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns the hour component.

◆ getFieldAsDateHour() [4/4]

int16_t sqlrcursor::getFieldAsDateHour ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the hour component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateHourIgnoringCase() [1/2]

int16_t sqlrcursor::getFieldAsDateHourIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the hour component, ignoring the case of "col".

◆ getFieldAsDateHourIgnoringCase() [2/2]

int16_t sqlrcursor::getFieldAsDateHourIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the hour component, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateIgnoringCase() [1/2]

bool sqlrcursor::getFieldAsDateIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
bool * isnegative )

Interprets the specified field as a date and populates its broken-down parts, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

Returns true if it was able to interpret the field as a date, and false otherwise.

◆ getFieldAsDateIgnoringCase() [2/2]

bool sqlrcursor::getFieldAsDateIgnoringCase ( uint64_t row,
const char * col,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
bool * isnegative )

Interprets the specified field as a date and populates its broken-down parts, ignoring the case of "col".

Returns true if it was able to interpret the field as a date, and false otherwise.

◆ getFieldAsDateIsNegative() [1/4]

bool sqlrcursor::getFieldAsDateIsNegative ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns whether the hour component is negative.

◆ getFieldAsDateIsNegative() [2/4]

bool sqlrcursor::getFieldAsDateIsNegative ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns whether the hour component is negative.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateIsNegative() [3/4]

bool sqlrcursor::getFieldAsDateIsNegative ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns whether the hour component is negative.

◆ getFieldAsDateIsNegative() [4/4]

bool sqlrcursor::getFieldAsDateIsNegative ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns whether the hour component is negative.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateIsNegativeIgnoringCase() [1/2]

bool sqlrcursor::getFieldAsDateIsNegativeIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns whether the hour component is negative, ignoring the case of "col".

◆ getFieldAsDateIsNegativeIgnoringCase() [2/2]

bool sqlrcursor::getFieldAsDateIsNegativeIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns whether the hour component is negative, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMicrosecond() [1/4]

int32_t sqlrcursor::getFieldAsDateMicrosecond ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the microsecond component.

◆ getFieldAsDateMicrosecond() [2/4]

int32_t sqlrcursor::getFieldAsDateMicrosecond ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the microsecond component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMicrosecond() [3/4]

int32_t sqlrcursor::getFieldAsDateMicrosecond ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns the microsecond component.

◆ getFieldAsDateMicrosecond() [4/4]

int32_t sqlrcursor::getFieldAsDateMicrosecond ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the microsecond component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMicrosecondIgnoringCase() [1/2]

int32_t sqlrcursor::getFieldAsDateMicrosecondIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the microsecond component, ignoring the case of "col".

◆ getFieldAsDateMicrosecondIgnoringCase() [2/2]

int32_t sqlrcursor::getFieldAsDateMicrosecondIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the microsecond component, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMinute() [1/4]

int16_t sqlrcursor::getFieldAsDateMinute ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the minute component.

◆ getFieldAsDateMinute() [2/4]

int16_t sqlrcursor::getFieldAsDateMinute ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the minute component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMinute() [3/4]

int16_t sqlrcursor::getFieldAsDateMinute ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns the minute component.

◆ getFieldAsDateMinute() [4/4]

int16_t sqlrcursor::getFieldAsDateMinute ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the minute component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMinuteIgnoringCase() [1/2]

int16_t sqlrcursor::getFieldAsDateMinuteIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the minute component, ignoring the case of "col".

◆ getFieldAsDateMinuteIgnoringCase() [2/2]

int16_t sqlrcursor::getFieldAsDateMinuteIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the minute component, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMonth() [1/4]

int16_t sqlrcursor::getFieldAsDateMonth ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the month component.

◆ getFieldAsDateMonth() [2/4]

int16_t sqlrcursor::getFieldAsDateMonth ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the month component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMonth() [3/4]

int16_t sqlrcursor::getFieldAsDateMonth ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns the month component.

◆ getFieldAsDateMonth() [4/4]

int16_t sqlrcursor::getFieldAsDateMonth ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the month component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateMonthIgnoringCase() [1/2]

int16_t sqlrcursor::getFieldAsDateMonthIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the month component, ignoring the case of "col".

◆ getFieldAsDateMonthIgnoringCase() [2/2]

int16_t sqlrcursor::getFieldAsDateMonthIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the month component, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateSecond() [1/4]

int16_t sqlrcursor::getFieldAsDateSecond ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the second component.

◆ getFieldAsDateSecond() [2/4]

int16_t sqlrcursor::getFieldAsDateSecond ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the second component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateSecond() [3/4]

int16_t sqlrcursor::getFieldAsDateSecond ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns the second component.

◆ getFieldAsDateSecond() [4/4]

int16_t sqlrcursor::getFieldAsDateSecond ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the second component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateSecondIgnoringCase() [1/2]

int16_t sqlrcursor::getFieldAsDateSecondIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the second component, ignoring the case of "col".

◆ getFieldAsDateSecondIgnoringCase() [2/2]

int16_t sqlrcursor::getFieldAsDateSecondIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the second component, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateYear() [1/4]

int16_t sqlrcursor::getFieldAsDateYear ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the year component.

◆ getFieldAsDateYear() [2/4]

int16_t sqlrcursor::getFieldAsDateYear ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the year component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateYear() [3/4]

int16_t sqlrcursor::getFieldAsDateYear ( uint64_t row,
uint32_t col )

Interprets the specified field as a date and returns the year component.

◆ getFieldAsDateYear() [4/4]

int16_t sqlrcursor::getFieldAsDateYear ( uint64_t row,
uint32_t col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the year component.

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDateYearIgnoringCase() [1/2]

int16_t sqlrcursor::getFieldAsDateYearIgnoringCase ( uint64_t row,
const char * col )

Interprets the specified field as a date and returns the year component, ignoring the case of "col".

◆ getFieldAsDateYearIgnoringCase() [2/2]

int16_t sqlrcursor::getFieldAsDateYearIgnoringCase ( uint64_t row,
const char * col,
bool ddmm,
bool yyyyddmm,
const char * datedelimiters )

Interprets the specified field as a date and returns the year component, ignoring the case of "col".

If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.

If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.

"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".

◆ getFieldAsDouble() [1/2]

double sqlrcursor::getFieldAsDouble ( uint64_t row,
const char * col )

Returns the specified field as a decimal.

◆ getFieldAsDouble() [2/2]

double sqlrcursor::getFieldAsDouble ( uint64_t row,
uint32_t col )

Returns the specified field as a decimal.

◆ getFieldAsDoubleIgnoringCase()

double sqlrcursor::getFieldAsDoubleIgnoringCase ( uint64_t row,
const char * col )

Returns the specified field as a decimal, ignoring the case of "col".

◆ getFieldAsInteger() [1/2]

int64_t sqlrcursor::getFieldAsInteger ( uint64_t row,
const char * col )

Returns the specified field as an integer.

◆ getFieldAsInteger() [2/2]

int64_t sqlrcursor::getFieldAsInteger ( uint64_t row,
uint32_t col )

Returns the specified field as an integer.

◆ getFieldAsIntegerIgnoringCase()

int64_t sqlrcursor::getFieldAsIntegerIgnoringCase ( uint64_t row,
const char * col )

Returns the specified field as an integer, ignoring the case of "col".

◆ getFieldIgnoringCase()

const char * sqlrcursor::getFieldIgnoringCase ( uint64_t row,
const char * col )

Returns the specified field as a string, ignoring the case of "col".

◆ getFieldLength() [1/2]

uint32_t sqlrcursor::getFieldLength ( uint64_t row,
const char * col )

Returns the length of the specified field.

◆ getFieldLength() [2/2]

uint32_t sqlrcursor::getFieldLength ( uint64_t row,
uint32_t col )

Returns the length of the specified field.

◆ getKeyAndIndexList()

bool sqlrcursor::getKeyAndIndexList ( const char * table,
const char * qualifier )

Generates a result set containing the keys and indexes of "table", which match the pattern "qualifier".

The result set will contain the following columns:

  • table
  • non_unique
  • key_name
  • seq_in_index
  • column_name
  • collation
  • cardinality
  • sub_part
  • packed
  • null
  • index_type
  • comment
  • index_comment

If "qualifier" is empty or NULL then a result set containing all keys and indexes of "table" will be returned.

If SQL Relay doesn't support getting a list of keys and indexes for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getLongest() [1/2]

uint32_t sqlrcursor::getLongest ( const char * col)

Returns the length of the longest field in the specified column.

◆ getLongest() [2/2]

uint32_t sqlrcursor::getLongest ( uint32_t col)

Returns the length of the longest field in the specified column.

◆ getNullsAsEmptyStrings()

void sqlrcursor::getNullsAsEmptyStrings ( )

Tells the connection to return NULL fields and output bind variables as empty strings. This is the default.

◆ getNullsAsNulls()

void sqlrcursor::getNullsAsNulls ( )

Tells the connection to return NULL fields and output bind variables as NULL's rather than as empty strings.

◆ getOutputBindBlob()

const char * sqlrcursor::getOutputBindBlob ( const char * variable)

Get the value stored in a previously defined binary lob output bind variable.

◆ getOutputBindClob()

const char * sqlrcursor::getOutputBindClob ( const char * variable)

Get the value stored in a previously defined character lob output bind variable.

◆ getOutputBindCursor()

sqlrcursor * sqlrcursor::getOutputBindCursor ( const char * variable)

Get the cursor associated with a previously defined output bind variable.

◆ getOutputBindDate()

bool sqlrcursor::getOutputBindDate ( const char * variable,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
const char ** tz,
bool * isnegative )

Get the value stored in a previously defined date output bind variable.

◆ getOutputBindDateDay()

int16_t sqlrcursor::getOutputBindDateDay ( const char * variable)

Get the day from a previously defined date output bind variable.

◆ getOutputBindDateHour()

int16_t sqlrcursor::getOutputBindDateHour ( const char * variable)

Get the hour from a previously defined date output bind variable.

◆ getOutputBindDateIsNegative()

bool sqlrcursor::getOutputBindDateIsNegative ( const char * variable)

Get whether the value is negative from a previously defined date output bind variable.

◆ getOutputBindDateMicrosecond()

int32_t sqlrcursor::getOutputBindDateMicrosecond ( const char * variable)

Get the microsecond from a previously defined date output bind variable.

◆ getOutputBindDateMinute()

int16_t sqlrcursor::getOutputBindDateMinute ( const char * variable)

Get the minute from a previously defined date output bind variable.

◆ getOutputBindDateMonth()

int16_t sqlrcursor::getOutputBindDateMonth ( const char * variable)

Get the month from a previously defined date output bind variable.

◆ getOutputBindDateSecond()

int16_t sqlrcursor::getOutputBindDateSecond ( const char * variable)

Get the second from a previously defined date output bind variable.

◆ getOutputBindDateTz()

const char * sqlrcursor::getOutputBindDateTz ( const char * variable)

Get the time zone from a previously defined date output bind variable.

◆ getOutputBindDateYear()

int16_t sqlrcursor::getOutputBindDateYear ( const char * variable)

Get the year from a previously defined date output bind variable.

◆ getOutputBindDouble()

double sqlrcursor::getOutputBindDouble ( const char * variable)

Get the value stored in a previously defined decimal output bind variable.

◆ getOutputBindInteger()

int64_t sqlrcursor::getOutputBindInteger ( const char * variable)

Get the value stored in a previously defined integer output bind variable.

◆ getOutputBindLength()

uint32_t sqlrcursor::getOutputBindLength ( const char * variable)

Get the length of the value stored in a previously defined output bind variable.

◆ getOutputBindString()

const char * sqlrcursor::getOutputBindString ( const char * variable)

Get the value stored in a previously defined string output bind variable.

◆ getPrimaryKeysList()

bool sqlrcursor::getPrimaryKeysList ( const char * table,
const char * columns )

Generates a result set containing the primary keys of "table", which match the pattern "columns".

The result set will contain the following columns:

  • table
  • non_unique
  • key_name
  • seq_in_index
  • column_name
  • collation
  • cardinality
  • sub_part
  • packed
  • null
  • index_type
  • comment
  • index_comment

If "columns" is empty or NULL then a result set containing all primary keys of "table" will be returned.

If SQL Relay doesn't support getting a list of primary keys for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getProcedureList()

bool sqlrcursor::getProcedureList ( const char * procedures)

Generates a result set containing procedures that match the pattern "procedures".

The result set will contain the following columns:

  • routine_catalog
  • routine_schema
  • routine_name
  • data_type

If "procedures" is empty or NULL then a result set containing all procedures in the current database/schema will be returned.

If SQL Relay doesn't support getting a list of procedures for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getProcedureParameterList()

bool sqlrcursor::getProcedureParameterList ( const char * procedure,
const char * parameters )

Generates a result set containing the parameters of "procedure", which match the pattern "parameters".

The result set will contain the following columns:

  • parameter_name
  • parameter_mode
  • data_type
  • character_maximum_length
  • ordinal_position

If "parameters" is empty or NULL then a result set containing all parameters of "procedure" will be returned.

If SQL Relay doesn't support getting a list of procedure parameters for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getResultSetBufferSize()

uint64_t sqlrcursor::getResultSetBufferSize ( )

Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.

◆ getResultSetId()

uint16_t sqlrcursor::getResultSetId ( )

Returns the internal ID of this result set. This parameter may be passed to another cursor for use in the resumeResultSet() method. Note: The value this method returns is only valid after a call to suspendResultSet().

◆ getRow()

const char *const * sqlrcursor::getRow ( uint64_t row)

Returns a null terminated array of the values of the fields in the specified row.

◆ getRowLengths()

uint32_t * sqlrcursor::getRowLengths ( uint64_t row)

Returns a null terminated array of the lengths of the fields in the specified row.

◆ getSchemaList()

bool sqlrcursor::getSchemaList ( const char * schemas)

Generates a result set containing schemas that match the pattern "schemas".

The result set will contain the following columns:

  • Database

(The column name is a bit of a misnomer, the results are schemas, not databases.)

If "schemas" is empty or NULL then a result set containing all schemas in the current database will be returned.

If SQL Relay doesn't support getting a list of schemas for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getTableList()

bool sqlrcursor::getTableList ( const char * tables)

Generates a result set containing the tables in the current database and schema that match the pattern "tables".

The result set will contain the following columns:

  • Tables_in_xxx

If "tables" is empty or NULL then a result set containing all tables in the current database/schema will be returned.

If SQL Relay doesn't support getting a list of tables for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getTableTypeList()

bool sqlrcursor::getTableTypeList ( )

Generates a result set containing supported table types.

The result set will contain the following columns:

  • table_type

If SQL Relay doesn't support getting a list of table types for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ getTypeInfoList()

bool sqlrcursor::getTypeInfoList ( const char * type)

Generates a result set containing data type information for "type".

The result set will contain the following columns:

  • type_name
  • data_type
  • precision
  • literal_prefix
  • literal_suffix
  • create_params
  • nullable
  • case_sensitive
  • searchable
  • unsigned_attribute
  • fixed_prec_scale
  • auto_increment
  • local_type_name
  • minumum_scale
  • maxiumm_scale
  • sql_data_type
  • sql_datetime_sub
  • num_prec_radix
  • interval_precision

If "type" is empty or NULL then a result set containing all data types in the current databas/schema will be returned.

If SQL Relay doesn't support getting type info for the current database backend (or the database doesn't) then an empty result set will be returned.

◆ inputBind() [1/5]

void sqlrcursor::inputBind ( const char * variable,
const char * value )

Defines a string input bind variable.

◆ inputBind() [2/5]

void sqlrcursor::inputBind ( const char * variable,
const char * value,
uint32_t valuelength )

Defines a string input bind variable.

◆ inputBind() [3/5]

void sqlrcursor::inputBind ( const char * variable,
double value,
uint32_t precision,
uint32_t scale )

Defines a decimal input bind variable. (If you don't have the precision and scale then set them both 0. However in that case you may get unexpected rounding behavior if the server is faking binds.)

◆ inputBind() [4/5]

void sqlrcursor::inputBind ( const char * variable,
int16_t year,
int16_t month,
int16_t day,
int16_t hour,
int16_t minute,
int16_t second,
int32_t microsecond,
const char * tz,
bool isnegative )

Defines a date input bind variable. "day" and "month" are 1-based.

Some databases distinguish between date, time, and datetime types. For those databases...

  • The input bind variable will be interpreted as a time type if year and/or month are negative.
  • The input bind variable will be interpreted as a date type if hour, minute, second, and/or microsecond are negative.
  • The input bind variable will be interpreted as a datetime type if all parts are positive.

"tz" is the timezone abbreviation, and may be left NULL. Most databases ignore "tz".

Set "isnegative" may be set to true to represent a negative time interval. However, few databases support negative time intervals and ignore "isnegative".

◆ inputBind() [5/5]

void sqlrcursor::inputBind ( const char * variable,
int64_t value )

Defines a integer input bind variable.

◆ inputBindBlob()

void sqlrcursor::inputBindBlob ( const char * variable,
const char * value,
uint32_t size )

Defines a binary lob input bind variable.

◆ inputBindClob()

void sqlrcursor::inputBindClob ( const char * variable,
const char * value,
uint32_t size )

Defines a character lob input bind variable.

◆ inputBinds() [1/3]

void sqlrcursor::inputBinds ( const char ** variables,
const char ** values )

Defines an array of string input bind variables.

◆ inputBinds() [2/3]

void sqlrcursor::inputBinds ( const char ** variables,
const double * values,
const uint32_t * precisions,
const uint32_t * scales )

Defines an array of decimal input bind variables.

◆ inputBinds() [3/3]

void sqlrcursor::inputBinds ( const char ** variables,
const int64_t * values )

Defines an array of integer input bind variables.

◆ lowerCaseColumnNames()

void sqlrcursor::lowerCaseColumnNames ( )

Columns names are converted to lower case.

◆ mixedCaseColumnNames()

void sqlrcursor::mixedCaseColumnNames ( )

Columns names are returned in the same case as they are defined in the database. This is the default.

◆ nextResultSet()

bool sqlrcursor::nextResultSet ( )

Returns true and acts like executeQuery() when there is another result set available from the server.

◆ openCachedResultSet()

bool sqlrcursor::openCachedResultSet ( const char * filename)

Opens a cached result set. Returns true on success and false on failure.

◆ prepareFileQuery()

bool sqlrcursor::prepareFileQuery ( const char * path,
const char * filename )

Prepare to execute the contents of "path"/"filename". Returns false if the // file couldn't be opened.

◆ prepareQuery() [1/2]

void sqlrcursor::prepareQuery ( const char * query)

Prepare to execute "query".

◆ prepareQuery() [2/2]

void sqlrcursor::prepareQuery ( const char * query,
uint32_t length )

Prepare to execute "query" with length "length". This method must be used if the query contains binary data.

◆ resumeCachedResultSet()

bool sqlrcursor::resumeCachedResultSet ( uint16_t id,
const char * filename )

Resumes a result set previously left open using suspendSession() and continues caching the result set to "filename". Returns true on success and false on failure.

◆ resumeResultSet()

bool sqlrcursor::resumeResultSet ( uint16_t id)

Resumes a result set previously left open using suspendSession(). Returns true on success and false on failure.

◆ rowCount()

uint64_t sqlrcursor::rowCount ( )

Returns the number of rows in the current result set (if the result set is being stepped through, this returns the number of rows processed so far).

◆ sendFileQuery()

bool sqlrcursor::sendFileQuery ( const char * path,
const char * filename )

Sends the query in file "path"/"filename" directly and gets a result set.

◆ sendQuery() [1/2]

bool sqlrcursor::sendQuery ( const char * query)

Sends "query" directly and gets a result set.

◆ sendQuery() [2/2]

bool sqlrcursor::sendQuery ( const char * query,
uint32_t length )

Sends "query" with length "length" directly and gets a result set. This method must be used if the query contains binary data.

◆ setCacheTtl()

void sqlrcursor::setCacheTtl ( uint32_t ttl)

Sets the time-to-live for cached result sets. The sqlr-cachemanger will remove each cached result set "ttl" seconds after it's created, provided it's scanning the directory containing the cache files.

◆ setResultSetBufferSize()

void sqlrcursor::setResultSetBufferSize ( uint64_t rows)

Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set.

◆ substitution() [1/3]

void sqlrcursor::substitution ( const char * variable,
const char * value )

Defines a string substitution variable.

◆ substitution() [2/3]

void sqlrcursor::substitution ( const char * variable,
double value,
uint32_t precision,
uint32_t scale )

Defines a decimal substitution variable.

◆ substitution() [3/3]

void sqlrcursor::substitution ( const char * variable,
int64_t value )

Defines an integer substitution variable.

◆ substitutions() [1/3]

void sqlrcursor::substitutions ( const char ** variables,
const char ** values )

Defines an array of string substitution variables.

◆ substitutions() [2/3]

void sqlrcursor::substitutions ( const char ** variables,
const double * values,
const uint32_t * precisions,
const uint32_t * scales )

Defines an array of decimal substitution variables.

◆ substitutions() [3/3]

void sqlrcursor::substitutions ( const char ** variables,
const int64_t * values )

Defines an array of integer substitution variables.

◆ suspendResultSet()

void sqlrcursor::suspendResultSet ( )

Tells the server to leave this result set open when the connection calls suspendSession() so that another connection can connect to it using resumeResultSet() after it calls resumeSession().

◆ totalRows()

uint64_t sqlrcursor::totalRows ( )

Returns the total number of rows that will be returned in the result set. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. 0 is returned by databases which don't support this option.

◆ upperCaseColumnNames()

void sqlrcursor::upperCaseColumnNames ( )

Columns names are converted to upper case.

◆ validateBinds()

void sqlrcursor::validateBinds ( )

If you are binding to any variables that might not actually be in your query, call this to ensure that the database won't try to bind them unless they really are in the query. There is a performance penalty for calling this method.

◆ validBind()

bool sqlrcursor::validBind ( const char * variable)

Returns true if "variable" was a valid bind variable of the query.