Column-oriented GPU-accelerated Database Management System
CoGaDB
CoGaDB::RowPage Class Reference

Representation of a set of rows stored as bytes. More...

#include <row_page.hpp>

Collaboration diagram for CoGaDB::RowPage:

List of all members.

Public Member Functions

 RowPage (unsigned short)
 RowPage (const RowPage &)
RowPageoperator= (const RowPage &)
bool isFull () const
bool fillPage (std::vector< BufferObject * >, int)
void print (const TableSchema &) const
unsigned short getMaxDataSize () const
unsigned short getDataSize () const
unsigned short count () const
char * createRow (std::vector< BufferObject * >, int, unsigned short &, unsigned short &)
char * getValue (unsigned int, unsigned int, unsigned short &) const
char * getData () const

Private Member Functions

char * getValueFromPage (BufferObject *, int, unsigned short &)
 Gets from a buffered page the value at 'index'. Also results the size of the value in bytes.
char * getStringFromPage (BufferObject *, int, unsigned short &)
 Gets from a buffered page the string at 'index'. Also results the size of the string in bytes.

Private Attributes

char * _rows
 Represents the rwos as bytes.
std::vector< unsigned short > _row_offsets
 Holds the offsets for each row.
unsigned short _col_count
 Number of columns for this rows.
unsigned short _row_count
 Number of rows on this page.
bool _is_full
 true, if the page can't hold a row anymore
unsigned short _current_data_size
 The current data size of all rows (_rows) in bytes.

Detailed Description

Representation of a set of rows stored as bytes.


Constructor & Destructor Documentation

CoGaDB::RowPage::RowPage ( unsigned short  columns)

References _row_offsets, _rows, and getMaxDataSize().

Here is the call graph for this function:


Member Function Documentation

unsigned short CoGaDB::RowPage::count ( ) const

References _row_count.

Referenced by getStringFromPage(), getValueFromPage(), and CoGaDB::RowTable::load().

Here is the caller graph for this function:

char * CoGaDB::RowPage::createRow ( std::vector< BufferObject * >  pages,
int  pos,
unsigned short &  offset,
unsigned short &  resRowSize 
)

References getValueFromPage().

Referenced by fillPage().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CoGaDB::RowPage::fillPage ( std::vector< BufferObject * >  pages,
int  start 
)

References _current_data_size, _is_full, _row_count, _row_offsets, _rows, createRow(), getMaxDataSize(), and isFull().

Referenced by CoGaDB::RowTable::load().

Here is the call graph for this function:

Here is the caller graph for this function:

char * CoGaDB::RowPage::getData ( ) const

References _rows.

unsigned short CoGaDB::RowPage::getDataSize ( ) const

References _current_data_size.

unsigned short CoGaDB::RowPage::getMaxDataSize ( ) const

Referenced by fillPage(), and RowPage().

Here is the caller graph for this function:

char * CoGaDB::RowPage::getStringFromPage ( BufferObject bo,
int  index,
unsigned short &  valueSize 
) [private]

Gets from a buffered page the string at 'index'. Also results the size of the string in bytes.

References count(), CoGaDB::BufferObject::getPage(), and CoGaDB::BufferObject::next().

Referenced by getValueFromPage().

Here is the call graph for this function:

Here is the caller graph for this function:

char * CoGaDB::RowPage::getValue ( unsigned int  page_row,
unsigned int  col,
unsigned short &  length 
) const

References _col_count, _row_offsets, and _rows.

char * CoGaDB::RowPage::getValueFromPage ( BufferObject bo,
int  index,
unsigned short &  valueSize 
) [private]

Gets from a buffered page the value at 'index'. Also results the size of the value in bytes.

References count(), CoGaDB::BufferObject::getPage(), getStringFromPage(), CoGaDB::BufferObject::next(), and CoGaDB::VARCHAR.

Referenced by createRow().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CoGaDB::RowPage::isFull ( ) const

References _is_full.

Referenced by fillPage().

Here is the caller graph for this function:

RowPage & CoGaDB::RowPage::operator= ( const RowPage )

Member Data Documentation

unsigned short CoGaDB::RowPage::_col_count [private]

Number of columns for this rows.

Referenced by getValue().

unsigned short CoGaDB::RowPage::_current_data_size [private]

The current data size of all rows (_rows) in bytes.

Referenced by fillPage(), getDataSize(), and print().

bool CoGaDB::RowPage::_is_full [private]

true, if the page can't hold a row anymore

Referenced by fillPage(), and isFull().

unsigned short CoGaDB::RowPage::_row_count [private]

Number of rows on this page.

Referenced by count(), fillPage(), and print().

std::vector<unsigned short> CoGaDB::RowPage::_row_offsets [private]

Holds the offsets for each row.

Referenced by fillPage(), getValue(), print(), and RowPage().

char* CoGaDB::RowPage::_rows [private]

Represents the rwos as bytes.

Referenced by fillPage(), getData(), getValue(), print(), and RowPage().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines