SQL Relay C++ API
|
#include <sqlrcollections.h>
Inherits dictionarycollection< const char *, const char * >.
Public Member Functions | |
sqlrrowdictionary () | |
sqlrrowdictionary (sqlrcursor *cursor) | |
sqlrrowdictionary (sqlrcursor *cursor, uint64_t row) | |
~sqlrrowdictionary () | |
void | setCursor (sqlrcursor *cursor) |
void | setRow (uint64_t row) |
bool | isReadOnly () |
bool | getValue (const char *key, const char **value) |
const char * | getValue (const char *key) |
bool | getKey (const char *key, const char **k) |
const char * | getKey (const char *key) |
linkedlist< const char * > * | getKeys () |
uint64_t | getCount () |
The sqlrrowdictionary class is a read-only implementation of the rudiments dictionarycollection<const char *, const char *> class.
After setting the cursor and row, it provides read-only access to the values of a single row in the result set, by column name.
The instance can be passed into any method that operates on a read-only rudiments dictionarycollection<const char *, const char *>, or otherwise used in the same manner that a read-only rudiments dictionarycollection<const char *, const char *> would be.
sqlrrowdictionary::sqlrrowdictionary | ( | ) |
Creates an instance of the sqlrrowdictionary class.
sqlrrowdictionary::sqlrrowdictionary | ( | sqlrcursor * | cursor | ) |
Creates an instance of the sqlrrowdictionary class and sets the cursor used by the instance to "cursor".
sqlrrowdictionary::sqlrrowdictionary | ( | sqlrcursor * | cursor, |
uint64_t | row ) |
Creates an instance of the sqlrrowdictionary class. Sets the cursor used by the instance to "cursor" and the row that the instance returns fields from to "row".
sqlrrowdictionary::~sqlrrowdictionary | ( | ) |
Deletes this instance of the sqlrrowdictionary class.
uint64_t sqlrrowdictionary::getCount | ( | ) |
Returns the number of key/value (column name/field) pairs in the dictionary.
const char * sqlrrowdictionary::getKey | ( | const char * | key | ) |
Returns the key (column name) associated with "key" (also column name) or NULL if "key" (also the column name) wasn't found (was an invalid column name). Note that there is no way to distinguish between failure to find "key" and a valid key (column name) of NULL associated with "key" (also column name).
bool sqlrrowdictionary::getKey | ( | const char * | key, |
const char ** | k ) |
Sets "k" to the key (column name) associated with "key" (also the column name). Returns true on success or false if "key" wasn't found (invalid column name).
linkedlist< const char * > * sqlrrowdictionary::getKeys | ( | ) |
Returns a list of the keys (column names) in the dictionary.
const char * sqlrrowdictionary::getValue | ( | const char * | key | ) |
Returns the value (field) associated with "key" (column name) or NULL if "key" wasn't found (was an invalid column name). Note that there is no way to distinguish between failure to find "key" and a valid value of NULL associated with "key".
bool sqlrrowdictionary::getValue | ( | const char * | key, |
const char ** | value ) |
Sets "value" to the value (field) associated with "key" (column name).
Returns true on success or false if "key" wasn't found.
bool sqlrrowdictionary::isReadOnly | ( | ) |
Returns true.
void sqlrrowdictionary::setCursor | ( | sqlrcursor * | cursor | ) |
Sets the cursor used by this instance to "cursor".
void sqlrrowdictionary::setRow | ( | uint64_t | row | ) |
Sets the row that this instance returns fields from to "row".