Column-oriented GPU-accelerated Database Management System
CoGaDB
|
#include <column.hpp>
Classes | |
struct | Type_TID_Comparator |
Public Member Functions | |
Column (const std::string &name, AttributeType db_type) | |
virtual | ~Column () |
virtual 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 | |
virtual 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. | |
std::vector< T > & | getContent () |
Column (const std::string &name, AttributeType db_type) | |
virtual | ~Column () |
virtual 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 | |
virtual 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 const ColumnPtr | materialize () throw () |
materializes a column to a normal uncompressed column with dense values | |
virtual const ColumnPtr | gather (PositionListPtr tid_list) |
creates a new column by fetching all values identified by the tid_list | |
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. | |
virtual const PositionListPtr | selection (const boost::any &value_for_comparison, const ValueComparator comp) |
filters the values of a column according to a filter condition consisting of a comparison value and a ValueComparator (=,<,>) | |
virtual const PositionListPtr | selection (ColumnPtr comparison_column, const ValueComparator comp) |
filters the values of a column according to a filter condition consisting of a comparison column and a ValueComparator (=,<,>). This implements the comparison of two values from two columns. | |
std::vector< T > & | getContent () |
template<> | |
unsigned int | getSizeinBytes () const throw() |
returns the size in bytes the column consumes in main memory | |
template<> | |
unsigned int | getSizeinBytes () const throw() |
returns the size in bytes the column consumes in main memory | |
Private Attributes | |
struct CoGaDB::Column::Type_TID_Comparator | type_tid_comparator |
std::vector< T > | values_ |
CoGaDB::Column< T >::Column | ( | const std::string & | name, |
AttributeType | db_type | ||
) |
CoGaDB::Column< T >::~Column | ( | ) | [virtual] |
CoGaDB::Column< T >::Column | ( | const std::string & | name, |
AttributeType | db_type | ||
) |
virtual CoGaDB::Column< T >::~Column | ( | ) | [virtual] |
bool CoGaDB::Column< T >::clearContent | ( | ) | [virtual] |
deletes all values stored in the column
Implements CoGaDB::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< T >::clearContent | ( | ) | [virtual] |
deletes all values stored in the column
Implements CoGaDB::ColumnBaseTyped< T >.
const ColumnPtr CoGaDB::Column< T >::copy | ( | ) | const [virtual] |
virtual copy constructor
Implements CoGaDB::ColumnBaseTyped< T >.
Referenced by CoGaDB::Column< T >::materialize().
virtual const ColumnPtr CoGaDB::Column< T >::copy | ( | ) | const [virtual] |
virtual copy constructor
Implements CoGaDB::ColumnBaseTyped< T >.
const ColumnPtr CoGaDB::Column< T >::gather | ( | PositionListPtr | tid_list | ) | [virtual] |
creates a new column by fetching all values identified by the tid_list
Implements CoGaDB::ColumnBaseTyped< T >.
References CoGaDB::ColumnBase::db_type_, and CoGaDB::ColumnBase::name_.
const boost::any CoGaDB::Column< 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::ColumnBaseTyped< T >.
virtual const boost::any CoGaDB::Column< 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::ColumnBaseTyped< T >.
std::vector< T > & CoGaDB::Column< T >::getContent | ( | ) |
Referenced by CoGaDB::CompressedColumn< T >::gather(), CoGaDB::LookupArray< T >::gather(), CoGaDB::CompressedColumn< T >::materialize(), and CoGaDB::LookupArray< T >::materialize().
std::vector<T>& CoGaDB::Column< T >::getContent | ( | ) |
unsigned int CoGaDB::Column< T >::getSizeinBytes | ( | ) | const throw () [virtual] |
returns the size in bytes the column consumes in main memory
Implements CoGaDB::ColumnBaseTyped< T >.
virtual unsigned int CoGaDB::Column< T >::getSizeinBytes | ( | ) | const throw () [virtual] |
returns the size in bytes the column consumes in main memory
Implements CoGaDB::ColumnBaseTyped< T >.
unsigned int CoGaDB::Column< std::string >::getSizeinBytes | ( | ) | const throw() [inline, virtual] |
returns the size in bytes the column consumes in main memory
Implements CoGaDB::ColumnBaseTyped< T >.
unsigned int CoGaDB::Column< std::string >::getSizeinBytes | ( | ) | const throw() [inline, virtual] |
returns the size in bytes the column consumes in main memory
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::insert | ( | const boost::any & | new_Value | ) | [virtual] |
appends a value new_Value to end of column
Implements CoGaDB::ColumnBaseTyped< T >.
Referenced by CoGaDB::reduce_by_keys().
bool CoGaDB::Column< T >::insert | ( | const T & | new_value | ) | [virtual] |
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::insert | ( | InputIterator | first, |
InputIterator | last | ||
) |
virtual bool CoGaDB::Column< T >::insert | ( | const boost::any & | new_Value | ) | [virtual] |
appends a value new_Value to end of column
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::insert | ( | const T & | new_value | ) | [virtual] |
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::insert | ( | InputIterator | first, |
InputIterator | last | ||
) |
bool CoGaDB::Column< T >::isCompressed | ( | ) | const throw () [virtual] |
use this method to determine whether the column is materialized or a Lookup Column
Implements CoGaDB::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< T >::isCompressed | ( | ) | const throw () [virtual] |
use this method to determine whether the column is materialized or a Lookup Column
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::isMaterialized | ( | ) | const throw () [virtual] |
use this method to determine whether the column is materialized or a Lookup Column
Implements CoGaDB::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< T >::isMaterialized | ( | ) | const throw () [virtual] |
use this method to determine whether the column is materialized or a Lookup Column
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< 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::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< 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::ColumnBaseTyped< T >.
const ColumnPtr CoGaDB::Column< T >::materialize | ( | ) | throw () [virtual] |
materializes a column to a normal uncompressed column with dense values
Implements CoGaDB::ColumnBaseTyped< T >.
References CoGaDB::Column< T >::copy().
T & CoGaDB::Column< 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::ColumnBaseTyped< T >.
virtual T& CoGaDB::Column< 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::ColumnBaseTyped< T >.
void CoGaDB::Column< T >::print | ( | ) | const throw () [virtual] |
prints the content of a column
Implements CoGaDB::ColumnBaseTyped< T >.
Referenced by CoGaDB::unit_tests::ColumnComputationTest().
virtual void CoGaDB::Column< T >::print | ( | ) | const throw () [virtual] |
prints the content of a column
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::remove | ( | TID | tid | ) | [virtual] |
deletes the value on position tid
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::remove | ( | PositionListPtr | tid | ) | [virtual] |
deletes the values defined in the position list
assumes tid list is sorted ascending
Implements CoGaDB::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< T >::remove | ( | TID | tid | ) | [virtual] |
deletes the value on position tid
Implements CoGaDB::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< T >::remove | ( | PositionListPtr | tid | ) | [virtual] |
deletes the values defined in the position list
assumes tid list is sorted ascending
Implements CoGaDB::ColumnBaseTyped< T >.
const PositionListPtr CoGaDB::Column< T >::selection | ( | const boost::any & | value_for_comparison, |
const ValueComparator | comp | ||
) | [virtual] |
filters the values of a column according to a filter condition consisting of a comparison value and a ValueComparator (=,<,>)
Reimplemented from CoGaDB::ColumnBaseTyped< T >.
References hype::util::begin_ptr(), CoGaDB::EQUAL, CoGaDB::GREATER, CoGaDB::GREATER_EQUAL, CoGaDB::LESSER, CoGaDB::LESSER_EQUAL, CoGaDB::quiet, and CoGaDB::ColumnBaseTyped< T >::type().
Referenced by CoGaDB::Column< T >::selection().
const PositionListPtr CoGaDB::Column< T >::selection | ( | ColumnPtr | , |
const ValueComparator | comp | ||
) | [virtual] |
filters the values of a column according to a filter condition consisting of a comparison column and a ValueComparator (=,<,>). This implements the comparison of two values from two columns.
Reimplemented from CoGaDB::ColumnBaseTyped< T >.
References CoGaDB::Column< T >::selection().
size_t CoGaDB::Column< T >::size | ( | ) | const throw () [virtual] |
returns the number of values (rows) in a column
Implements CoGaDB::ColumnBaseTyped< T >.
virtual size_t CoGaDB::Column< T >::size | ( | ) | const throw () [virtual] |
returns the number of values (rows) in a column
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::store | ( | const std::string & | path | ) | [virtual] |
store a column on the disc
Implements CoGaDB::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< T >::store | ( | const std::string & | path | ) | [virtual] |
store a column on the disc
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< T >::update | ( | TID | tid, |
const boost::any & | new_Value | ||
) | [virtual] |
updates the value on position tid with a value new_Value
Implements CoGaDB::ColumnBaseTyped< T >.
bool CoGaDB::Column< 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::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< T >::update | ( | TID | tid, |
const boost::any & | new_Value | ||
) | [virtual] |
updates the value on position tid with a value new_Value
Implements CoGaDB::ColumnBaseTyped< T >.
virtual bool CoGaDB::Column< 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::ColumnBaseTyped< T >.
struct CoGaDB::Column::Type_TID_Comparator CoGaDB::Column< T >::type_tid_comparator [private] |
std::vector< T > CoGaDB::Column< T >::values_ [private] |
values