Column-oriented GPU-accelerated Database Management System
CoGaDB
CoGaDB::RowValueColumn< T > Class Template Reference

Interface for column based access to the early materialized table RowTable. More...

#include <row_value_column.hpp>

Inheritance diagram for CoGaDB::RowValueColumn< T >:
Collaboration diagram for CoGaDB::RowValueColumn< T >:

List of all members.

Public Member Functions

 RowValueColumn (RowTablePtr, string &, const AttributeType &)
virtual ~RowValueColumn ()
bool isCompressed () const throw ()
 use this method to determine whether the column is materialized or a Lookup Column
bool update (PositionListPtr tid, const boost::any &new_value)
 updates the values specified by the position list with a value new_Value
bool remove (PositionListPtr tid)
 deletes the values defined in the position list
bool insert (const boost::any &new_Value)
 
  • Not implemented -

bool update (TID tid, const boost::any &new_Value)
 
  • Not implemented -

bool remove (TID tid)
 
  • Not implemented -

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
size_t size () const throw ()
 
  • Not implemented -

unsigned int getSizeinBytes () const throw ()
 
  • Not implemented -

const ColumnPtr copy () const
 
  • Not implemented -

bool store (const string &path)
 
  • Not implemented -

bool load (const string &path)
 
  • Not implemented -

bool isMaterialized () const throw ()
 Always false.
const type_info & type () const throw ()
 returns type information of internal values
T & operator[] (const int index)
 Index-based access. Use for accessing values in column.
ColumnPtr toColumn ()
template<>
int & operator[] (const int index)
 defines operator[] for this class, which enables the user to thread all typed columns as arrays.
template<>
string & operator[] (const int index)
 defines operator[] for this class, which enables the user to thread all typed columns as arrays.
template<>
bool & operator[] (const int index)
 defines operator[] for this class, which enables the user to thread all typed columns as arrays.
template<>
float & operator[] (const int index)
 defines operator[] for this class, which enables the user to thread all typed columns as arrays.

Private Member Functions

char * getValue (const int index, unsigned short &stringLength) const
 Gets a value at a specific row (index) as bytes (char*)

Private Attributes

RowTablePtr _row_table_ptr
 Pointer to RowTable (early materialized table) to which this Column depents.
unsigned int _column_index
 Column Index of the RowTable.
AttributeType _type
 Type of this column.

Detailed Description

template<typename T>
class CoGaDB::RowValueColumn< T >

Interface for column based access to the early materialized table RowTable.


Constructor & Destructor Documentation

template<typename T >
CoGaDB::RowValueColumn< T >::RowValueColumn ( RowTablePtr  row_table_ptr,
string &  name,
const AttributeType type 
)
template<typename T >
CoGaDB::RowValueColumn< T >::~RowValueColumn ( ) [virtual]

Member Function Documentation

template<typename T >
const ColumnPtr CoGaDB::RowValueColumn< T >::copy ( ) const [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
const boost::any CoGaDB::RowValueColumn< 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)

Returns:
object of type boost::any containing the value on position tid

Implements CoGaDB::ColumnBaseTyped< T >.

References CoGaDB::BOOLEAN, CoGaDB::FLOAT, CoGaDB::INT, and CoGaDB::VARCHAR.

template<typename T >
unsigned int CoGaDB::RowValueColumn< T >::getSizeinBytes ( ) const throw () [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
char * CoGaDB::RowValueColumn< T >::getValue ( const int  index,
unsigned short &  stringLength 
) const [private]

Gets a value at a specific row (index) as bytes (char*)

template<typename T >
bool CoGaDB::RowValueColumn< T >::insert ( const boost::any &  new_Value) [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
bool CoGaDB::RowValueColumn< T >::isCompressed ( ) const throw () [virtual]

use this method to determine whether the column is materialized or a Lookup Column

Returns:
true in case the column is storing the compressed values and false otherwise.

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
bool CoGaDB::RowValueColumn< T >::isMaterialized ( ) const throw () [virtual]

Always false.

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
bool CoGaDB::RowValueColumn< T >::load ( const string &  path) [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
T& CoGaDB::RowValueColumn< T >::operator[] ( const int  index) [virtual]

Index-based access. Use for accessing values in column.

Implements CoGaDB::ColumnBaseTyped< T >.

template<>
int & CoGaDB::RowValueColumn< int >::operator[] ( const int  index) [inline, 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.

Returns:
a reference to the value at position index

Implements CoGaDB::ColumnBaseTyped< T >.

template<>
string & CoGaDB::RowValueColumn< string >::operator[] ( const int  index) [inline, 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.

Returns:
a reference to the value at position index

Implements CoGaDB::ColumnBaseTyped< T >.

template<>
bool & CoGaDB::RowValueColumn< bool >::operator[] ( const int  index) [inline, 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.

Returns:
a reference to the value at position index

Implements CoGaDB::ColumnBaseTyped< T >.

template<>
float & CoGaDB::RowValueColumn< float >::operator[] ( const int  index) [inline, 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.

Returns:
a reference to the value at position index

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
void CoGaDB::RowValueColumn< T >::print ( ) const throw () [virtual]

prints the content of a column

Implements CoGaDB::ColumnBaseTyped< T >.

References CoGaDB::BOOLEAN, CoGaDB::FLOAT, CoGaDB::INT, and CoGaDB::VARCHAR.

template<typename T >
bool CoGaDB::RowValueColumn< T >::remove ( PositionListPtr  tid) [virtual]

deletes the values defined in the position list

assumes tid list is sorted ascending

Returns:
true for sucess and false in case an error occured

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
bool CoGaDB::RowValueColumn< T >::remove ( TID  tid) [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
size_t CoGaDB::RowValueColumn< T >::size ( ) const throw () [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
bool CoGaDB::RowValueColumn< T >::store ( const string &  path) [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
ColumnPtr CoGaDB::RowValueColumn< T >::toColumn ( )

References CoGaDB::createColumn(), and CoGaDB::util::getName().

Here is the call graph for this function:

template<typename T >
const std::type_info & CoGaDB::RowValueColumn< T >::type ( ) const throw () [virtual]

returns type information of internal values

Reimplemented from CoGaDB::ColumnBaseTyped< T >.

template<typename T >
bool CoGaDB::RowValueColumn< T >::update ( PositionListPtr  tids,
const boost::any &  new_value 
) [virtual]

updates the values specified by the position list with a value new_Value

Returns:
true for sucess and false in case an error occured

Implements CoGaDB::ColumnBaseTyped< T >.

template<typename T >
bool CoGaDB::RowValueColumn< T >::update ( TID  tid,
const boost::any &  new_Value 
) [virtual]

  • Not implemented -

Implements CoGaDB::ColumnBaseTyped< T >.


Member Data Documentation

template<typename T >
unsigned int CoGaDB::RowValueColumn< T >::_column_index [private]

Column Index of the RowTable.

template<typename T >
RowTablePtr CoGaDB::RowValueColumn< T >::_row_table_ptr [private]

Pointer to RowTable (early materialized table) to which this Column depents.

template<typename T >
AttributeType CoGaDB::RowValueColumn< T >::_type [private]

Type of this column.


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