Column-oriented GPU-accelerated Database Management System
CoGaDB
|
#include <row_table.hpp>
Public Types | |
typedef shared_pointer_namespace::shared_ptr < RowTable > | RowTablePtr |
Public Member Functions | |
RowTable (const string &name, const TableSchema &schema) | |
virtual | ~RowTable () |
bool | update (PositionListPtr tids, const std::string &attribute_name, const boost::any &value) |
bool | remove (PositionListPtr tids) |
virtual void | print () |
For printing the table. | |
virtual bool | store () |
Stores the column in filesystem. | |
virtual bool | load () |
Load Table from DB (implemented as loading from file at specific path) | |
virtual bool | loadDatafromFile (string filepath) |
Load table from file (not implemented). Use load() | |
virtual const TablePtr | materialize () const |
virtual unsigned int | getNumberofRows () const throw () |
bool | isMaterialized () const throw () |
Always true, becuase of early materialization at loading time. | |
virtual const Tuple | fetchTuple (const TID &id) const |
| |
virtual bool | insert (const Tuple &t) |
| |
virtual bool | update (const string &attribute_name, const boost::any &value) |
| |
virtual bool | remove (const string &attribute_name, const boost::any &value) |
| |
virtual const ColumnPtr | getColumnbyName (const std::string &column_name) const throw () |
| |
const std::vector< RowPagePtr > & | getRowPages () const |
Gets the RowPages for this table. | |
RowPagePtr | getPageByIndex (unsigned int index, unsigned int &prefix) |
Protected Member Functions | |
virtual const std::vector < ColumnPtr > & | getColumns () const |
Private Member Functions | |
void | updateMapping (unsigned int count, unsigned int value) |
Private Attributes | |
RowTablePtr | _rtp |
std::vector< RowPagePtr > | _row_pages |
std::vector< unsigned int > | _row_pages_prefix |
std::vector< unsigned int > | _row_page_mapping |
std::vector< ColumnPtr > | _cols |
unsigned int | _row_count |
bool | _isMaterialized |
Always true, becuase of early materialization at loading time. |
typedef shared_pointer_namespace::shared_ptr<RowTable> CoGaDB::RowTable::RowTablePtr |
CoGaDB::RowTable::RowTable | ( | const string & | name, |
const TableSchema & | schema | ||
) |
CoGaDB::RowTable::~RowTable | ( | ) | [virtual] |
const Tuple CoGaDB::RowTable::fetchTuple | ( | const TID & | id | ) | const [virtual] |
Implements CoGaDB::BaseTable.
const ColumnPtr CoGaDB::RowTable::getColumnbyName | ( | const std::string & | column_name | ) | const throw () [virtual] |
Implements CoGaDB::BaseTable.
References CoGaDB::util::getName().
Referenced by print().
const vector< ColumnPtr > & CoGaDB::RowTable::getColumns | ( | ) | const [protected, virtual] |
Implements CoGaDB::BaseTable.
References _cols.
unsigned int CoGaDB::RowTable::getNumberofRows | ( | ) | const throw () [virtual] |
RowPagePtr CoGaDB::RowTable::getPageByIndex | ( | unsigned int | index, |
unsigned int & | prefix | ||
) |
References _row_page_mapping, _row_pages, and _row_pages_prefix.
const std::vector< RowPagePtr > & CoGaDB::RowTable::getRowPages | ( | ) | const |
Gets the RowPages for this table.
References _row_pages.
bool CoGaDB::RowTable::insert | ( | const Tuple & | t | ) | [virtual] |
Implements CoGaDB::BaseTable.
bool CoGaDB::RowTable::isMaterialized | ( | ) | const throw () [virtual] |
Always true, becuase of early materialization at loading time.
Implements CoGaDB::BaseTable.
References _isMaterialized.
bool CoGaDB::RowTable::load | ( | ) | [virtual] |
Load Table from DB (implemented as loading from file at specific path)
Implements CoGaDB::BaseTable.
References _cols, _row_count, _row_pages, _rtp, CoGaDB::BOOLEAN, CoGaDB::RowPage::count(), CoGaDB::RowPage::fillPage(), CoGaDB::FLOAT, CoGaDB::BufferManager::getInstance(), CoGaDB::BufferManager::getPages(), CoGaDB::BaseTable::getSchema(), CoGaDB::getTimestamp(), CoGaDB::INT, CoGaDB::BaseTable::name_, updateMapping(), and CoGaDB::VARCHAR.
bool CoGaDB::RowTable::loadDatafromFile | ( | string | filepath | ) | [virtual] |
Load table from file (not implemented). Use load()
Implements CoGaDB::BaseTable.
const TablePtr CoGaDB::RowTable::materialize | ( | ) | const [virtual] |
Implements CoGaDB::BaseTable.
void CoGaDB::RowTable::print | ( | ) | [virtual] |
For printing the table.
Implements CoGaDB::BaseTable.
References _row_count, CoGaDB::BOOLEAN, CoGaDB::FLOAT, getColumnbyName(), CoGaDB::BaseTable::getSchema(), CoGaDB::INT, and CoGaDB::VARCHAR.
bool CoGaDB::RowTable::remove | ( | PositionListPtr | tids | ) |
bool CoGaDB::RowTable::remove | ( | const string & | attribute_name, |
const boost::any & | value | ||
) | [virtual] |
Implements CoGaDB::BaseTable.
bool CoGaDB::RowTable::store | ( | ) | [virtual] |
Stores the column in filesystem.
Implements CoGaDB::BaseTable.
bool CoGaDB::RowTable::update | ( | PositionListPtr | tids, |
const std::string & | attribute_name, | ||
const boost::any & | value | ||
) |
bool CoGaDB::RowTable::update | ( | const string & | attribute_name, |
const boost::any & | value | ||
) | [virtual] |
Implements CoGaDB::BaseTable.
void CoGaDB::RowTable::updateMapping | ( | unsigned int | count, |
unsigned int | value | ||
) | [private] |
References _row_count, _row_page_mapping, and _row_pages_prefix.
Referenced by load().
std::vector<ColumnPtr> CoGaDB::RowTable::_cols [private] |
Referenced by getColumns(), and load().
bool CoGaDB::RowTable::_isMaterialized [private] |
Always true, becuase of early materialization at loading time.
Referenced by isMaterialized().
unsigned int CoGaDB::RowTable::_row_count [private] |
Referenced by getNumberofRows(), load(), print(), and updateMapping().
std::vector<unsigned int> CoGaDB::RowTable::_row_page_mapping [private] |
Referenced by getPageByIndex(), and updateMapping().
std::vector<RowPagePtr> CoGaDB::RowTable::_row_pages [private] |
Referenced by getPageByIndex(), getRowPages(), and load().
std::vector<unsigned int> CoGaDB::RowTable::_row_pages_prefix [private] |
Referenced by getPageByIndex(), and updateMapping().
RowTablePtr CoGaDB::RowTable::_rtp [private] |
Referenced by load().