Column-oriented GPU-accelerated Database Management System
CoGaDB
|
#include <delta_compressed_column.hpp>
Public Member Functions | |
DeltaCompressedColumn (const std::string &name, AttributeType db_type) | |
~DeltaCompressedColumn () | |
bool | insert (const boost::any &new_Value) |
appends a value new_Value to end of column | |
bool | insert (const std::string &new_value) |
template<typename InputIterator > | |
bool | insert (InputIterator first, InputIterator last) |
bool | update (TID tid, const boost::any &new_value) |
updates the value on position tid with a value new_Value | |
bool | update (PositionListPtr tid, const boost::any &new_value) |
updates the values specified by the position list with a value new_Value | |
bool | remove (TID tid) |
deletes the value on position tid | |
bool | remove (PositionListPtr tid) |
deletes the values defined in the position list | |
bool | clearContent () |
deletes all values stored in the column | |
const boost::any | get (TID tid) |
generic function for fetching a value form a column (slow) | |
void | print () const throw () |
prints the content of a column | |
size_t | size () const throw () |
returns the number of values (rows) in a column | |
unsigned int | getSizeinBytes () const throw () |
returns the size in bytes the column consumes in main memory | |
const ColumnPtr | copy () const |
virtual copy constructor | |
bool | store (const std::string &path) |
store a column on the disc | |
bool | load (const std::string &path) |
load column from disc | |
std::string & | operator[] (const int index) |
defines operator[] for this class, which enables the user to thread all typed columns as arrays. | |
DeltaCompressedColumn (const std::string &name, AttributeType db_type) | |
~DeltaCompressedColumn () | |
bool | insert (const boost::any &new_Value) |
appends a value new_Value to end of column | |
bool | insert (const std::string &new_value) |
template<typename InputIterator > | |
bool | insert (InputIterator first, InputIterator last) |
bool | update (TID tid, const boost::any &new_value) |
updates the value on position tid with a value new_Value | |
bool | update (PositionListPtr tid, const boost::any &new_value) |
updates the values specified by the position list with a value new_Value | |
bool | remove (TID tid) |
deletes the value on position tid | |
bool | remove (PositionListPtr tid) |
deletes the values defined in the position list | |
bool | clearContent () |
deletes all values stored in the column | |
const boost::any | get (TID tid) |
generic function for fetching a value form a column (slow) | |
void | print () const throw () |
prints the content of a column | |
size_t | size () const throw () |
returns the number of values (rows) in a column | |
unsigned int | getSizeinBytes () const throw () |
returns the size in bytes the column consumes in main memory | |
const ColumnPtr | copy () const |
virtual copy constructor | |
bool | store (const std::string &path) |
store a column on the disc | |
bool | load (const std::string &path) |
load column from disc | |
std::string & | operator[] (const int index) |
defines operator[] for this class, which enables the user to thread all typed columns as arrays. | |
Private Member Functions | |
std::string | uncompress (TID tid) |
void | compress_update (TID tid, std::string value) |
std::string | uncompress (TID tid) |
void | compress_update (TID tid, std::string value) |
Private Attributes | |
std::vector< std::string > | cvalues_ |
std::string | hack_last_uncompressed |
CoGaDB::DeltaCompressedColumn< std::string >::DeltaCompressedColumn | ( | const std::string & | name, |
AttributeType | db_type | ||
) |
CoGaDB::DeltaCompressedColumn< std::string >::~DeltaCompressedColumn | ( | ) |
CoGaDB::DeltaCompressedColumn< std::string >::DeltaCompressedColumn | ( | const std::string & | name, |
AttributeType | db_type | ||
) |
CoGaDB::DeltaCompressedColumn< std::string >::~DeltaCompressedColumn | ( | ) |
bool CoGaDB::DeltaCompressedColumn< std::string >::clearContent | ( | ) | [virtual] |
deletes all values stored in the column
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::clearContent | ( | ) | [virtual] |
deletes all values stored in the column
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::cvalues_.
void CoGaDB::DeltaCompressedColumn< std::string >::compress_update | ( | TID | tid, |
std::string | value | ||
) | [private] |
void CoGaDB::DeltaCompressedColumn< std::string >::compress_update | ( | TID | tid, |
std::string | value | ||
) | [private] |
References CoGaDB::DeltaCompressedColumn< T >::cvalues_, and CoGaDB::DeltaCompressedColumn< T >::uncompress().
const ColumnPtr CoGaDB::DeltaCompressedColumn< std::string >::copy | ( | ) | const [virtual] |
virtual copy constructor
Implements CoGaDB::CompressedColumn< std::string >.
const ColumnPtr CoGaDB::DeltaCompressedColumn< std::string >::copy | ( | ) | const [virtual] |
virtual copy constructor
Implements CoGaDB::CompressedColumn< std::string >.
const boost::any CoGaDB::DeltaCompressedColumn< std::string >::get | ( | TID | tid | ) | [virtual] |
generic function for fetching a value form a column (slow)
check whether the object is valid (e.g., when a tid is not valid, then the returned object is invalid as well)
Implements CoGaDB::CompressedColumn< std::string >.
const boost::any CoGaDB::DeltaCompressedColumn< std::string >::get | ( | TID | tid | ) | [virtual] |
generic function for fetching a value form a column (slow)
check whether the object is valid (e.g., when a tid is not valid, then the returned object is invalid as well)
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::cvalues_, and CoGaDB::ColumnBase::name_.
unsigned int CoGaDB::DeltaCompressedColumn< std::string >::getSizeinBytes | ( | ) | const throw () [virtual] |
returns the size in bytes the column consumes in main memory
Implements CoGaDB::CompressedColumn< std::string >.
uint CoGaDB::DeltaCompressedColumn< std::string >::getSizeinBytes | ( | ) | const throw () [virtual] |
returns the size in bytes the column consumes in main memory
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::cvalues_.
bool CoGaDB::DeltaCompressedColumn< std::string >::insert | ( | const boost::any & | new_Value | ) | [virtual] |
appends a value new_Value to end of column
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::insert | ( | const std::string & | new_value | ) | [virtual] |
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::insert | ( | const boost::any & | new_Value | ) | [virtual] |
appends a value new_Value to end of column
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::insert().
bool CoGaDB::DeltaCompressedColumn< std::string >::insert | ( | InputIterator | first, |
InputIterator | last | ||
) |
bool CoGaDB::DeltaCompressedColumn< std::string >::insert | ( | const std::string & | new_value | ) | [virtual] |
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::compress_update(), and CoGaDB::DeltaCompressedColumn< T >::cvalues_.
bool CoGaDB::DeltaCompressedColumn< std::string >::insert | ( | InputIterator | first, |
InputIterator | last | ||
) |
bool CoGaDB::DeltaCompressedColumn< std::string >::load | ( | const std::string & | path | ) | [virtual] |
load column from disc
calling load on a column that is not empty yields undefined behaviour
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::load | ( | const std::string & | path | ) | [virtual] |
load column from disc
calling load on a column that is not empty yields undefined behaviour
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::cvalues_, and CoGaDB::ColumnBase::name_.
std::string& CoGaDB::DeltaCompressedColumn< std::string >::operator[] | ( | const int | index | ) | [virtual] |
defines operator[] for this class, which enables the user to thread all typed columns as arrays.
Note that this method is pure virtual, so it has to be defined in a derived class.
Implements CoGaDB::CompressedColumn< std::string >.
std::string & CoGaDB::DeltaCompressedColumn< std::string >::operator[] | ( | const int | index | ) | [virtual] |
defines operator[] for this class, which enables the user to thread all typed columns as arrays.
Note that this method is pure virtual, so it has to be defined in a derived class.
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::hack_last_uncompressed, and CoGaDB::DeltaCompressedColumn< T >::uncompress().
void CoGaDB::DeltaCompressedColumn< std::string >::print | ( | ) | const throw () [virtual] |
prints the content of a column
Implements CoGaDB::CompressedColumn< std::string >.
void CoGaDB::DeltaCompressedColumn< std::string >::print | ( | ) | const throw () [virtual] |
prints the content of a column
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::ColumnBase::name_.
bool CoGaDB::DeltaCompressedColumn< std::string >::remove | ( | TID | tid | ) | [virtual] |
deletes the value on position tid
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::remove | ( | PositionListPtr | tid | ) | [virtual] |
deletes the values defined in the position list
assumes tid list is sorted ascending
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::remove | ( | TID | tid | ) | [virtual] |
deletes the value on position tid
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::compress_update(), CoGaDB::DeltaCompressedColumn< T >::cvalues_, and CoGaDB::DeltaCompressedColumn< T >::uncompress().
bool CoGaDB::DeltaCompressedColumn< std::string >::remove | ( | PositionListPtr | tid | ) | [virtual] |
deletes the values defined in the position list
assumes tid list is sorted ascending
Implements CoGaDB::CompressedColumn< std::string >.
size_t CoGaDB::DeltaCompressedColumn< std::string >::size | ( | ) | const throw () [virtual] |
returns the number of values (rows) in a column
Implements CoGaDB::CompressedColumn< std::string >.
size_t CoGaDB::DeltaCompressedColumn< std::string >::size | ( | ) | const throw () [virtual] |
returns the number of values (rows) in a column
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::cvalues_.
bool CoGaDB::DeltaCompressedColumn< std::string >::store | ( | const std::string & | path | ) | [virtual] |
store a column on the disc
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::store | ( | const std::string & | path | ) | [virtual] |
store a column on the disc
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::cvalues_, and CoGaDB::ColumnBase::name_.
std::string CoGaDB::DeltaCompressedColumn< std::string >::uncompress | ( | TID | tid | ) | [private] |
std::string CoGaDB::DeltaCompressedColumn< std::string >::uncompress | ( | TID | tid | ) | [private] |
References CoGaDB::DeltaCompressedColumn< T >::cvalues_.
bool CoGaDB::DeltaCompressedColumn< std::string >::update | ( | TID | tid, |
const boost::any & | new_Value | ||
) | [virtual] |
updates the value on position tid with a value new_Value
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::update | ( | PositionListPtr | tids, |
const boost::any & | new_value | ||
) | [virtual] |
updates the values specified by the position list with a value new_Value
Implements CoGaDB::CompressedColumn< std::string >.
bool CoGaDB::DeltaCompressedColumn< std::string >::update | ( | TID | tid, |
const boost::any & | new_Value | ||
) | [virtual] |
updates the value on position tid with a value new_Value
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::DeltaCompressedColumn< T >::compress_update(), CoGaDB::DeltaCompressedColumn< T >::cvalues_, CoGaDB::ColumnBase::name_, and CoGaDB::DeltaCompressedColumn< T >::uncompress().
bool CoGaDB::DeltaCompressedColumn< std::string >::update | ( | PositionListPtr | tids, |
const boost::any & | new_value | ||
) | [virtual] |
updates the values specified by the position list with a value new_Value
Implements CoGaDB::CompressedColumn< std::string >.
References CoGaDB::ColumnBase::name_, and CoGaDB::DeltaCompressedColumn< T >::update().
std::vector< std::string > CoGaDB::DeltaCompressedColumn< std::string >::cvalues_ [private] |
std::string CoGaDB::DeltaCompressedColumn< std::string >::hack_last_uncompressed [private] |