Classes | |
struct | bufferElement |
A buffer element is a minimal data structure to store a column in memory. More... | |
Public Member Functions | |
virtual ibis::table::stringArray | columnNames () const |
virtual ibis::table::typeArray | columnTypes () const |
cursor (const ibis::mensa &t) | |
Constructure a cursor object for row-wise data access to a ibis::mensa object. More... | |
virtual int | dump (std::ostream &out, const char *del) const |
Print the current row. More... | |
int | dumpBlock (std::ostream &out, const char *del) |
Print out the content of the current block. More... | |
int | dumpSome (std::ostream &out, uint64_t nr, const char *del) |
Print the next nr rows of the table to the specified output stream. | |
virtual int | fetch () |
Points the the next row. | |
virtual int | fetch (uint64_t) |
Pointers to the specified row. | |
virtual int | fetch (ibis::table::row &) |
Fetch the content of the next row and make the next row as the current row as well. More... | |
virtual int | fetch (uint64_t, ibis::table::row &) |
Fetch the content of the specified row and make that row the current row as well. More... | |
virtual int | getColumnAsByte (const char *, char &) const |
virtual int | getColumnAsByte (uint32_t, char &) const |
virtual int | getColumnAsDouble (const char *, double &) const |
virtual int | getColumnAsDouble (uint32_t, double &) const |
virtual int | getColumnAsFloat (const char *, float &) const |
virtual int | getColumnAsFloat (uint32_t, float &) const |
virtual int | getColumnAsInt (const char *, int32_t &) const |
virtual int | getColumnAsInt (uint32_t, int32_t &) const |
virtual int | getColumnAsLong (const char *, int64_t &) const |
virtual int | getColumnAsLong (uint32_t, int64_t &) const |
virtual int | getColumnAsOpaque (const char *, ibis::opaque &) const |
virtual int | getColumnAsOpaque (uint32_t, ibis::opaque &) const |
virtual int | getColumnAsShort (const char *, int16_t &) const |
virtual int | getColumnAsShort (uint32_t, int16_t &) const |
virtual int | getColumnAsString (const char *, std::string &) const |
virtual int | getColumnAsString (uint32_t, std::string &) const |
virtual int | getColumnAsUByte (const char *, unsigned char &) const |
virtual int | getColumnAsUByte (uint32_t, unsigned char &) const |
virtual int | getColumnAsUInt (const char *, uint32_t &) const |
virtual int | getColumnAsUInt (uint32_t, uint32_t &) const |
virtual int | getColumnAsULong (const char *, uint64_t &) const |
virtual int | getColumnAsULong (uint32_t, uint64_t &) const |
virtual int | getColumnAsUShort (const char *, uint16_t &) const |
virtual int | getColumnAsUShort (uint32_t, uint16_t &) const |
virtual uint64_t | getCurrentRowNumber () const |
Return the current row number. More... | |
virtual uint32_t | nColumns () const |
virtual uint64_t | nRows () const |
Protected Types | |
typedef std::map< const char *, uint32_t, ibis::lessi > | bufferMap |
Protected Member Functions | |
void | clearBuffers () |
!< the current row number More... | |
int | dumpIJ (std::ostream &, uint32_t, uint32_t) const |
Print the ith element in the current block for column j. More... | |
int | fillBuffer (uint32_t) const |
Fill the buffer for variable number i . More... | |
int | fillBuffers () const |
Fill the buffers for every column. More... | |
void | fillRow (ibis::table::row &res) const |
Protected Member Functions inherited from ibis::table::cursor | |
cursor (const cursor &) | |
cursor & | operator= (const cursor &) |
Protected Attributes | |
uint64_t | bBegin |
!< the first row number of the current partition | |
uint64_t | bEnd |
!< the first row number of the current block | |
std::vector< bufferElement > | buffer |
bufferMap | bufmap |
unsigned | curPart |
int64_t | curRow |
!< end of the current block | |
uint64_t | pBegin |
unsigned | preferred_block_size |
const ibis::mensa & | tab |
ibis::mensa::cursor::cursor | ( | const ibis::mensa & | t | ) |
Constructure a cursor object for row-wise data access to a ibis::mensa
object.
References ibis::fileManager::bytesFree(), cursor(), ibis::DOUBLE, ibis::FLOAT, ibis::part::getColumn(), ibis::INT, ibis::LONG, ibis::column::name(), ibis::table::name(), ibis::mensa::naty, ibis::part::nColumns(), ibis::OID, ibis::mensa::parts, ibis::SHORT, ibis::column::type(), ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
Referenced by cursor().
|
protected |
!< the current row number
Mark all existing buffer as empty.
References ibis::mensa::clear(), ibis::DOUBLE, ibis::FLOAT, ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
virtual |
Print the current row.
Assumes the caller has performed the fetch operation.
Return values:
Implements ibis::table::cursor.
int ibis::mensa::cursor::dumpBlock | ( | std::ostream & | out, |
const char * | del | ||
) |
Print out the content of the current block.
Also move the pointer to the last row of the block.
Referenced by ibis::mensa::dump().
|
protected |
Print the ith element in the current block for column j.
References ibis::BLOB, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::blob::getBlob(), ibis::text::getString(), ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::TEXT, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
virtual |
Fetch the content of the next row and make the next row as the current row as well.
Implements ibis::table::cursor.
|
virtual |
Fetch the content of the specified row and make that row the current row as well.
Implements ibis::table::cursor.
|
protected |
Fill the buffer for variable number i
.
On success, return 0, otherwise return a negative value.
cval
in the buffer for a string valued column is not the usual ibis::fileManager::storage object, instead it is simply the pointer to the ibis::column object. The string variable is retrieved through the column object one at a time using the function getString
. References ibis::bitvector::adjustSize(), ibis::bitvector::appendFill(), ibis::BLOB, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::part::getColumn(), ibis::INT, ibis::LONG, ibis::column::name(), ibis::part::nRows(), ibis::OID, ibis::column::selectValues(), ibis::SHORT, ibis::TEXT, ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
protected |
Fill the buffers for every column.
If all column buffers are not empty, then they are assumed to contain the expected content already. Otherwise, it calls fillBuffer on each column.
References ibis::DOUBLE, ibis::FLOAT, ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::mensa::parts.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::UBYTE.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::DOUBLE, ibis::INT, ibis::SHORT, ibis::UBYTE, ibis::UINT, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::FLOAT, ibis::SHORT, ibis::UBYTE, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::INT, ibis::SHORT, ibis::UBYTE, ibis::UINT, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::BLOB, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::column::getOpaque(), ibis::column::getString(), ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::TEXT, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::SHORT, ibis::UBYTE, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::BLOB, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::blob::getBlob(), ibis::util::getString(), ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::TEXT, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::UBYTE.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::INT, ibis::SHORT, ibis::UBYTE, ibis::UINT, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
inlinevirtual |
Retrieve the value of the named column.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
|
virtual |
This version of getColumnAsTTT directly use the column number, i.e., the position of a column in the list returned by function columnNames
or columnTypes
. This version of the data access function may be able to avoid the name lookup and reduce the execution time.
These functions return the number of elements copied upon successful completion, otherwise they return a negative number to indicate failure.
Implements ibis::table::cursor.
References ibis::SHORT, ibis::UBYTE, and ibis::USHORT.
|
inlinevirtual |
Return the current row number.
Rows in a data set are numbered [0
nRows()-1
]. If the cursor is not ready, such as before the first call to fetch
or function fetch
returned an error, this function return the same value as function nRows
. Implements ibis::table::cursor.
References curRow.