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

#include <sqlrcollections.h>

Inherits listcollection< const char * >.

Public Member Functions

 sqlrresultsetlist ()
 
 sqlrresultsetlist (sqlrcursor *cursor)
 
 sqlrresultsetlist (sqlrcursor *cursor, uint64_t col)
 
 ~sqlrresultsetlist ()
 
void setCursor (sqlrcursor *cursor)
 
void setColumn (uint32_t col)
 
bool isReadOnly ()
 
bool isBlockBased ()
 
uint64_t getBlockSize ()
 
uint64_t getCount ()
 
listnode< const char * > * getFirst ()
 
listnode< const char * > * getNext (listnode< const char * > *node)
 
listnode< const char * > * find (const char *value)
 
listnode< const char * > * find (listnode< const char * > *startnode, const char *value)
 

Detailed Description

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

After setting the cursor and column, it provides read-only, block-based access to the values in that column of each row in the result set.

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

Constructor & Destructor Documentation

◆ sqlrresultsetlist() [1/3]

sqlrresultsetlist::sqlrresultsetlist ( )

Creates an empty instance of the sqlrresultsetlist class.

◆ sqlrresultsetlist() [2/3]

sqlrresultsetlist::sqlrresultsetlist ( sqlrcursor * cursor)

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

◆ sqlrresultsetlist() [3/3]

sqlrresultsetlist::sqlrresultsetlist ( sqlrcursor * cursor,
uint64_t col )

Creates an instance of the sqlrresultsetlist class. Sets the cursor used by the instance to "cursor" and the column that the instance returns fields from to "col".

◆ ~sqlrresultsetlist()

sqlrresultsetlist::~sqlrresultsetlist ( )

Deletes this instance of the sqlrresultsetlist class.

Member Function Documentation

◆ find() [1/2]

listnode< const char * > * sqlrresultsetlist::find ( const char * value)

Returns a pointer to the first listnode containing "value" or NULL if "value" was not found.

◆ find() [2/2]

listnode< const char * > * sqlrresultsetlist::find ( listnode< const char * > * startnode,
const char * value )

Returns a pointer to the first listnode after "startnode" containing "value" or NULL if "value" was not found.

◆ getBlockSize()

uint64_t sqlrresultsetlist::getBlockSize ( )

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

◆ getCount()

uint64_t sqlrresultsetlist::getCount ( )

Returns the number of nodes in the sqlrresultsetlist.

◆ getFirst()

listnode< const char * > * sqlrresultsetlist::getFirst ( )

Returns the first node in the sqlrresultsetlist.

◆ getNext()

listnode< const char * > * sqlrresultsetlist::getNext ( listnode< const char * > * node)

Returns the node after "node" or NULL if this node is the last node in the list. "node" is presumed to be in the list.

◆ isBlockBased()

bool sqlrresultsetlist::isBlockBased ( )

Returns true.

◆ isReadOnly()

bool sqlrresultsetlist::isReadOnly ( )

Returns true.

◆ setColumn()

void sqlrresultsetlist::setColumn ( uint32_t col)

Sets the column that this instance returns fields from to "col".

◆ setCursor()

void sqlrresultsetlist::setCursor ( sqlrcursor * cursor)

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