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

#include <sqlrcollections.h>

Inherits scalarcollection< const char * >.

Public Member Functions

 sqlrscalar ()
 
 sqlrscalar (sqlrcursor *cursor)
 
 sqlrscalar (sqlrcursor *cursor, uint64_t row, uint64_t column)
 
 ~sqlrscalar ()
 
bool isReadOnly ()
 
void setCursor (sqlrcursor *cursor)
 
void setRow (uint64_t row)
 
void setColumn (uint32_t col)
 
const char * getValue ()
 
const char *& getReference ()
 

Detailed Description

The sqlrscalar class is a read-only implementation of the rudiments scalarcollection<const char *> class.

After setting the cursor, row, and column, it provides read-only access to the value of a single field in the result set.

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

Constructor & Destructor Documentation

◆ sqlrscalar() [1/3]

sqlrscalar::sqlrscalar ( )

Creates an empty instance of the sqlrscalar class.

◆ sqlrscalar() [2/3]

sqlrscalar::sqlrscalar ( sqlrcursor * cursor)

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

◆ sqlrscalar() [3/3]

sqlrscalar::sqlrscalar ( sqlrcursor * cursor,
uint64_t row,
uint64_t column )

Creates an instance of the sqlrscalar class. Sets the cursor used by the instance to "cursor", the row that the instance returns fields from to "row", and the column that the instance returns fields from to "column".

◆ ~sqlrscalar()

sqlrscalar::~sqlrscalar ( )

Deletes this instance of the sqlrscalar class.

Member Function Documentation

◆ getReference()

const char *& sqlrscalar::getReference ( )

Returns a reference to the value stored in this instance.

◆ getValue()

const char * sqlrscalar::getValue ( )

Returns the value stored in this instance. Returns NULL or 0 if no value has been stored.

◆ isReadOnly()

bool sqlrscalar::isReadOnly ( )

Returns true.

◆ setColumn()

void sqlrscalar::setColumn ( uint32_t col)

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

◆ setCursor()

void sqlrscalar::setCursor ( sqlrcursor * cursor)

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

◆ setRow()

void sqlrscalar::setRow ( uint64_t row)

Sets the row that this instance returns fields from to "row".