![]() |
Column-oriented GPU-accelerated Database Management System
CoGaDB
|
This class represents a dictionary compressed column with type T, is the base class for all compressed typed column classes. More...
#include <dictionary_compressed_column.hpp>


Public Member Functions | |
| DictionaryCompressedColumn (const std::string &name, AttributeType db_type) | |
| virtual | ~DictionaryCompressedColumn () |
| bool | insert (const boost::any &new_Value) |
| appends a value new_Value to end of column | |
| bool | insert (const T &new_value) |
| template<typename InputIterator > | |
| bool | insert (InputIterator first, InputIterator last) |
| virtual bool | update (TID tid, const boost::any &new_value) |
| updates the value on position tid with a value new_Value | |
| virtual bool | update (PositionListPtr tid, const boost::any &new_value) |
| updates the values specified by the position list with a value new_Value | |
| virtual bool | remove (TID tid) |
| deletes the value on position tid | |
| virtual bool | remove (PositionListPtr tid) |
| deletes the values defined in the position list | |
| bool | clearContent () |
| deletes all values stored in the column | |
| virtual const boost::any | get (TID tid) |
| generic function for fetching a value form a column (slow) | |
| virtual void | print () const throw () |
| prints the content of a column | |
| virtual size_t | size () const throw () |
| returns the number of values (rows) in a column | |
| virtual unsigned int | getSizeinBytes () const throw () |
| returns the size in bytes the column consumes in main memory | |
| virtual const ColumnPtr | copy () const |
| virtual copy constructor | |
| virtual bool | store (const std::string &path) |
| store a column on the disc | |
| virtual bool | load (const std::string &path) |
| load column from disc | |
| virtual bool | isMaterialized () const throw () |
| use this method to determine whether the column is materialized or a Lookup Column | |
| virtual bool | isCompressed () const throw () |
| use this method to determine whether the column is materialized or a Lookup Column | |
| virtual T & | operator[] (const int index) |
| defines operator[] for this class, which enables the user to thread all typed columns as arrays. | |
Private Types | |
| typedef std::map< T, uint32_t > | Dictionary |
Private Attributes | |
| std::vector< uint32_t > | ids_ |
| Dictionary | dictionary_ |
| std::vector< T > | reverse_lookup_vector_ |
| uint32_t | maximal_id_ |
This class represents a dictionary compressed column with type T, is the base class for all compressed typed column classes.
typedef std::map<T,uint32_t> CoGaDB::DictionaryCompressedColumn< T >::Dictionary [private] |
| CoGaDB::DictionaryCompressedColumn< T >::DictionaryCompressedColumn | ( | const std::string & | name, |
| AttributeType | db_type | ||
| ) |
| CoGaDB::DictionaryCompressedColumn< T >::~DictionaryCompressedColumn | ( | ) | [virtual] |
| bool CoGaDB::DictionaryCompressedColumn< T >::clearContent | ( | ) | [virtual] |
deletes all values stored in the column
Implements CoGaDB::CompressedColumn< T >.
| const ColumnPtr CoGaDB::DictionaryCompressedColumn< T >::copy | ( | ) | const [virtual] |
virtual copy constructor
Implements CoGaDB::CompressedColumn< T >.
| const boost::any CoGaDB::DictionaryCompressedColumn< T >::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< T >.
| unsigned int CoGaDB::DictionaryCompressedColumn< T >::getSizeinBytes | ( | ) | const throw () [virtual] |
returns the size in bytes the column consumes in main memory
Implements CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::insert | ( | const boost::any & | new_Value | ) | [virtual] |
appends a value new_Value to end of column
Implements CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::insert | ( | const T & | new_value | ) | [virtual] |
Implements CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::insert | ( | InputIterator | first, |
| InputIterator | last | ||
| ) |
| bool CoGaDB::DictionaryCompressedColumn< T >::isCompressed | ( | ) | const throw () [virtual] |
use this method to determine whether the column is materialized or a Lookup Column
Reimplemented from CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::isMaterialized | ( | ) | const throw () [virtual] |
use this method to determine whether the column is materialized or a Lookup Column
Reimplemented from CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::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< T >.
References CoGaDB::debug, CoGaDB::quiet, and CoGaDB::verbose.
| T & CoGaDB::DictionaryCompressedColumn< T >::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< T >.
| void CoGaDB::DictionaryCompressedColumn< T >::print | ( | ) | const throw () [virtual] |
prints the content of a column
Implements CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::remove | ( | TID | tid | ) | [virtual] |
deletes the value on position tid
Implements CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::remove | ( | PositionListPtr | tid | ) | [virtual] |
deletes the values defined in the position list
assumes tid list is sorted ascending
Implements CoGaDB::CompressedColumn< T >.
| size_t CoGaDB::DictionaryCompressedColumn< T >::size | ( | ) | const throw () [virtual] |
returns the number of values (rows) in a column
Implements CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::store | ( | const std::string & | path | ) | [virtual] |
store a column on the disc
Implements CoGaDB::CompressedColumn< T >.
References CoGaDB::debug, CoGaDB::util::getName(), CoGaDB::quiet, and CoGaDB::verbose.

| bool CoGaDB::DictionaryCompressedColumn< T >::update | ( | TID | tid, |
| const boost::any & | new_Value | ||
| ) | [virtual] |
updates the value on position tid with a value new_Value
Implements CoGaDB::CompressedColumn< T >.
| bool CoGaDB::DictionaryCompressedColumn< T >::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< T >.
Dictionary CoGaDB::DictionaryCompressedColumn< T >::dictionary_ [private] |
std::vector<uint32_t> CoGaDB::DictionaryCompressedColumn< T >::ids_ [private] |
uint32_t CoGaDB::DictionaryCompressedColumn< T >::maximal_id_ [private] |
std::vector<T> CoGaDB::DictionaryCompressedColumn< T >::reverse_lookup_vector_ [private] |