Home Libraries Author Links

stm::db::sql::table Class Reference
[DbSql: SQL Interface of Named Persistent Associative Containers]

List of all members.


Detailed Description

Abstract base class representing a SQL database table.

Definition at line 177 of file dbsql.hpp.


Public Member Functions

virtual ~table ()
 Virtual destructor.
virtual const std::string & name () const =0
 Returns the table's name.
virtual const layoutcolumns () const =0
 Returns the table's layout.
virtual layoutcolumns ()=0
 Returns the table's layout.
virtual size_t size () const =0
 Returns the table's size.
virtual bool fixed () const =0
virtual void setFixed (bool val=true)=0
bool typeDefined (const std::string &name) const throw ()
template<class TableTypes>
TableTypes::dbmap_type & getDbmap ()
template<class TableTypes>
TableTypes::indexes & getDbindexes ()
template<class TableTypes>
TableTypes::recnomap_type & getRecnomap ()
template<class TableTypes>
TableTypes::recnoindexes & getRecnoindexes ()
template<class TableTypes>
TableTypes::invrecnomap_type & getInvrecnomap ()
template<class TableTypes>
TableTypes::invrecnoindexes & getInvrecnoindexes ()
resultcreateResult (const std::string &columnName, bool descending=false)
virtual resultcreateResult (size_t column, bool descending=false)=0
virtual resultcurrentResult ()=0
virtual const resultcurrentResult () const =0
void demandSorting (const std::string &columnName)
virtual void demandSorting (size_t column)=0

Static Public Member Functions

template<class TableTypes>
static void defineType (const std::string &name) throw (std::runtime_error)
 Define a new table type named name determined by the template parameter TableTypes, which shall be a specialization of the class template table::types<DefColSequence>.

Classes

struct  average
struct  average< bool >
struct  average< db::null_type >
struct  average< std::string >
struct  average< std::vector< byte > >
class  column
struct  defcol
class  descr
class  descrmap
class  field
class  layout
class  locker
struct  types

Constructor & Destructor Documentation

virtual stm::db::sql::table::~table (  )  [virtual]

Virtual destructor.


Member Function Documentation

virtual const std::string& stm::db::sql::table::name (  )  const [pure virtual]

Returns the table's name.

virtual const layout& stm::db::sql::table::columns (  )  const [pure virtual]

Returns the table's layout.

virtual layout& stm::db::sql::table::columns (  )  [pure virtual]

Returns the table's layout.

This non const version is required in order to manipulate a column's format.

virtual size_t stm::db::sql::table::size (  )  const [pure virtual]

Returns the table's size.

virtual bool stm::db::sql::table::fixed (  )  const [pure virtual]

virtual void stm::db::sql::table::setFixed ( bool  val = true  )  [pure virtual]

bool stm::db::sql::table::typeDefined ( const std::string &  name  )  const throw ()

template<class TableTypes>
static void stm::db::sql::table::defineType ( const std::string &  name  )  throw (std::runtime_error) [static]

Define a new table type named name determined by the template parameter TableTypes, which shall be a specialization of the class template table::types<DefColSequence>.

This can be done successfully, if name is not empty and no table type of this name has already been defined. The method throws on error. Table types have to be created on every application run anew, as they cannot be stored persistently. Intentionally there is no means to delete an existing table type during the runtime of the application.

template<class TableTypes>
TableTypes::dbmap_type& stm::db::sql::table::getDbmap (  ) 

template<class TableTypes>
TableTypes::indexes& stm::db::sql::table::getDbindexes (  ) 

template<class TableTypes>
TableTypes::recnomap_type& stm::db::sql::table::getRecnomap (  ) 

template<class TableTypes>
TableTypes::recnoindexes& stm::db::sql::table::getRecnoindexes (  ) 

template<class TableTypes>
TableTypes::invrecnomap_type& stm::db::sql::table::getInvrecnomap (  ) 

template<class TableTypes>
TableTypes::invrecnoindexes& stm::db::sql::table::getInvrecnoindexes (  ) 

result* stm::db::sql::table::createResult ( const std::string &  columnName,
bool  descending = false 
)

virtual result* stm::db::sql::table::createResult ( size_t  column,
bool  descending = false 
) [pure virtual]

virtual result* stm::db::sql::table::currentResult (  )  [pure virtual]

virtual const result* stm::db::sql::table::currentResult (  )  const [pure virtual]

void stm::db::sql::table::demandSorting ( const std::string &  columnName  ) 

virtual void stm::db::sql::table::demandSorting ( size_t  column  )  [pure virtual]


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).