Public Member Functions | List of all members
ibis::query::result Class Reference

The class ibis::query::result allows user to retrieve query result one row at a time. More...

#include <bundle.h>

Public Member Functions

uint32_t colPosition (const char *cname) const
 
double getDouble (const char *cname) const
 Retrieve the value of the named column as a double-precision floating-point number. More...
 
double getDouble (uint32_t selind) const
 Retrieve the value of column selind in the select clause as a double-precision floating-point number. More...
 
float getFloat (const char *cname) const
 Retrieve the value of the named column as a single-precision floating-point number. More...
 
float getFloat (uint32_t selind) const
 Retrieve the value of column selind in the select clause as a single-precision floating-point number. More...
 
int32_t getInt (const char *cname) const
 Retrieve the value of the named column as a signed integer. More...
 
int32_t getInt (uint32_t selind) const
 Retrieve the value of column selind in the select clause as a signed integer. More...
 
int64_t getLong (const char *cname) const
 Retrieve the value as a 64-bit integer.
 
int64_t getLong (uint32_t selind) const
 Retrieve the value as a 64-bit integer.
 
std::string getString (const char *cname) const
 
std::string getString (uint32_t selind) const
 Retrieve the string value. More...
 
uint32_t getUInt (const char *cname) const
 Retrieve the value of the named column as an unsigned integer.
 
uint32_t getUInt (uint32_t selind) const
 Retrieve the value of column selind in the select clause as an unsigned integer. More...
 
uint64_t getULong (const char *cname) const
 Retrieve the value as a 64-bit unsigned integer.
 
uint64_t getULong (uint32_t selind) const
 Retrieve the value of column selind in the select clause as a 64-bit unsigned integer. More...
 
bool next ()
 Move to the next row/record of results.
 
bool nextBundle ()
 Jump to the next bundle of results.
 
void printColumnNames (std::ostream &out) const
 
void reset ()
 Move the internal pointer back to the beginning. More...
 
 result (ibis::query &q)
 
uint32_t width () const
 

Detailed Description

The class ibis::query::result allows user to retrieve query result one row at a time.

It matches the semantics of an ODBC cursor; that is the function next has to be called before the first set of results can be used.

Note
This implementation makes use of ibis::bundle for internal storage, which means the results returned are sorted, see documentation about ibis::bundle for more detail.
This implementation stores the results in memory. Therefore, it is not suitable for handling large result sets.

Member Function Documentation

double ibis::query::result::getDouble ( const char *  cname) const

Retrieve the value of the named column as a double-precision floating-point number.

double ibis::query::result::getDouble ( uint32_t  selind) const
inline

Retrieve the value of column selind in the select clause as a double-precision floating-point number.

float ibis::query::result::getFloat ( const char *  cname) const

Retrieve the value of the named column as a single-precision floating-point number.

float ibis::query::result::getFloat ( uint32_t  selind) const
inline

Retrieve the value of column selind in the select clause as a single-precision floating-point number.

int32_t ibis::query::result::getInt ( const char *  cname) const

Retrieve the value of the named column as a signed integer.

Note
The name must appeared in the select clause of the query used to construct the result object.
int32_t ibis::query::result::getInt ( uint32_t  selind) const
inline

Retrieve the value of column selind in the select clause as a signed integer.

Note
Since this version avoids the name look up, it should be more efficient than the version taking the column name as argument.
std::string ibis::query::result::getString ( uint32_t  selind) const
inline

Retrieve the string value.

See also
ibis::bundle::getString for limitations.
uint32_t ibis::query::result::getUInt ( uint32_t  selind) const
inline

Retrieve the value of column selind in the select clause as an unsigned integer.

uint64_t ibis::query::result::getULong ( uint32_t  selind) const
inline

Retrieve the value of column selind in the select clause as a 64-bit unsigned integer.

void ibis::query::result::reset ( )

Move the internal pointer back to the beginning.

Must call next to use the first set of results.


The documentation for this class was generated from the following files:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive