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

Inherits tablecollection< const char * >.

Public Member Functions

 sqlrresultsettable ()
 
 sqlrresultsettable (sqlrcursor *cursor)
 
 ~sqlrresultsettable ()
 
void setCursor (sqlrcursor *cursor)
 
bool isReadOnly ()
 
bool isBlockBased ()
 
uint64_t getBlockSize ()
 
bool isSequentialAccess ()
 
const char * getColumnName (uint64_t col)
 
uint64_t getColumnCount ()
 
const char * getValue (uint64_t row, uint64_t col)
 
const char *& getReference (uint64_t row, uint64_t col)
 
const char * getValue (uint64_t row, const char *colname)
 
uint64_t getRowCount ()
 
bool getAllRowsAvailable ()
 

Detailed Description

The sqlrrowlist class is a read-only, block-based, sequential implementation of the rudiments tablecollection<const char *> class.

After setting the cursor, it provides read-only, block-based, sequential access to the values of the fields in the result set.

The instance can be passed into any method that operates on a read-only, block-based, sequential rudiments tablecollection<const char *>, or otherwise used in the same manner that a read-only, block-based, sequential rudiments tablecollection<const char *> would be.

Constructor & Destructor Documentation

◆ sqlrresultsettable() [1/2]

sqlrresultsettable::sqlrresultsettable ( )

Creates an instance of the sqlrresultsettable class.

◆ sqlrresultsettable() [2/2]

sqlrresultsettable::sqlrresultsettable ( sqlrcursor cursor)

Creates an instance of the sqlrresultsettable class and sets the cursor used by the instance to "cursor".

◆ ~sqlrresultsettable()

sqlrresultsettable::~sqlrresultsettable ( )

Deletes this intance of the sqlrresultsettable class.

Member Function Documentation

◆ getAllRowsAvailable()

bool sqlrresultsettable::getAllRowsAvailable ( )

Returns true when the last block of rows has been fetched.

◆ getBlockSize()

uint64_t sqlrresultsettable::getBlockSize ( )

Returns the result set buffer size of the cursor used by this intance. Returns 0 if the cursor is configured to fetch all rows at once.

◆ getColumnCount()

uint64_t sqlrresultsettable::getColumnCount ( )

Returns the current number of columns in the table.

◆ getColumnName()

const char* sqlrresultsettable::getColumnName ( uint64_t  col)

Returns the name of column "col".

◆ getReference()

const char* & sqlrresultsettable::getReference ( uint64_t  row,
uint64_t  col 
)

Returns the value at "row", "col".

◆ getRowCount()

uint64_t sqlrresultsettable::getRowCount ( )

Returns the current number of rows in the table. May increase as new blocks of rows are fetched.

◆ getValue() [1/2]

const char* sqlrresultsettable::getValue ( uint64_t  row,
const char *  colname 
)

Returns the value at "row", "colname". Returns NULL or 0 if there is no value at that address.

◆ getValue() [2/2]

const char* sqlrresultsettable::getValue ( uint64_t  row,
uint64_t  col 
)

Returns the value at "row", "col". Returns NULL or 0 if there is no value at that address.

◆ isBlockBased()

bool sqlrresultsettable::isBlockBased ( )

Returns true.

◆ isReadOnly()

bool sqlrresultsettable::isReadOnly ( )

Returns true.

◆ isSequentialAccess()

bool sqlrresultsettable::isSequentialAccess ( )

Returns true.

◆ setCursor()

void sqlrresultsettable::setCursor ( sqlrcursor cursor)

Sets the cursor used by this instance to "cursor".