Wolframe, 0.0.3

_Wolframe::db::vm::ValueTupleSet Class Reference

Set of tuples (database results, transaction input, etc.) More...

#include <valueTupleSet.hpp>

Classes

class  const_iterator
 Iterator on this set of value tuples. More...
 

Public Member Functions

 ValueTupleSet ()
 Default constructor. More...
 
 ValueTupleSet (const std::vector< std::string > &colnames_)
 Constructor. More...
 
 ValueTupleSet (const ValueTupleSet &o)
 Copy constructor. More...
 
const_iterator begin () const
 Get the start tuple set iterator. More...
 
const_iterator end () const
 Get the end tuple set iterator. More...
 
std::size_t nofColumns () const
 Get the number of columns. More...
 
const std::string & columnName (std::size_t i) const
 Get the name of a column numbered starting with 1. More...
 
std::size_t columnIndex (const std::string &name) const
 Get the index of a column by name numbered starting with 1. More...
 
void push (const std::vector< types::VariantConst > &c)
 Add one tuple to the set (checking its size) More...
 
void push (const std::vector< types::Variant > &c)
 Add one tuple to the set (checking its size) More...
 
std::size_t size () const
 Get the number of tuples in the tuple set. More...
 
bool empty () const
 Evaluate if the tuple set is empty. More...
 
void checkConstraintNonEmpty () const
 Check the NONEMPTY constaint on this tuple set. More...
 
void checkConstraintUnique () const
 Check the UNIQUE constaint on this tuple set. More...
 
void append (const ValueTupleSet &ts)
 Append a tuple set (checking number of columns to be equal in both sets) More...
 

Private Attributes

std::vector< std::string > m_colnames
 
std::vector< types::Variantm_ar
 

Friends

class const_iterator
 

Detailed Description

Set of tuples (database results, transaction input, etc.)

Constructor & Destructor Documentation

_Wolframe::db::vm::ValueTupleSet::ValueTupleSet ( )
inline

Default constructor.

_Wolframe::db::vm::ValueTupleSet::ValueTupleSet ( const std::vector< std::string > &  colnames_)
inlineexplicit

Constructor.

_Wolframe::db::vm::ValueTupleSet::ValueTupleSet ( const ValueTupleSet o)
inline

Copy constructor.

Member Function Documentation

void _Wolframe::db::vm::ValueTupleSet::append ( const ValueTupleSet ts)
inline

Append a tuple set (checking number of columns to be equal in both sets)

const_iterator _Wolframe::db::vm::ValueTupleSet::begin ( ) const
inline

Get the start tuple set iterator.

void _Wolframe::db::vm::ValueTupleSet::checkConstraintNonEmpty ( ) const
inline

Check the NONEMPTY constaint on this tuple set.

void _Wolframe::db::vm::ValueTupleSet::checkConstraintUnique ( ) const
inline

Check the UNIQUE constaint on this tuple set.

std::size_t _Wolframe::db::vm::ValueTupleSet::columnIndex ( const std::string &  name) const
inline

Get the index of a column by name numbered starting with 1.

const std::string& _Wolframe::db::vm::ValueTupleSet::columnName ( std::size_t  i) const
inline

Get the name of a column numbered starting with 1.

bool _Wolframe::db::vm::ValueTupleSet::empty ( ) const
inline

Evaluate if the tuple set is empty.

Returns
true, if yes
const_iterator _Wolframe::db::vm::ValueTupleSet::end ( ) const
inline

Get the end tuple set iterator.

std::size_t _Wolframe::db::vm::ValueTupleSet::nofColumns ( ) const
inline

Get the number of columns.

void _Wolframe::db::vm::ValueTupleSet::push ( const std::vector< types::VariantConst > &  c)
inline

Add one tuple to the set (checking its size)

void _Wolframe::db::vm::ValueTupleSet::push ( const std::vector< types::Variant > &  c)
inline

Add one tuple to the set (checking its size)

std::size_t _Wolframe::db::vm::ValueTupleSet::size ( ) const
inline

Get the number of tuples in the tuple set.

Returns
the number of tuples

Friends And Related Function Documentation

friend class const_iterator
friend

Member Data Documentation

std::vector<types::Variant> _Wolframe::db::vm::ValueTupleSet::m_ar
private
std::vector<std::string> _Wolframe::db::vm::ValueTupleSet::m_colnames
private

The documentation for this class was generated from the following file: