35 #ifndef _DATABASE_TRANSACTION_EXECUTION_STATEMACHINE_HPP_INCLUDED
36 #define _DATABASE_TRANSACTION_EXECUTION_STATEMACHINE_HPP_INCLUDED
41 #include <boost/shared_ptr.hpp>
59 virtual const std::string&
databaseID()
const=0;
62 virtual bool begin()=0;
70 virtual bool start(
const std::string& statement)=0;
78 virtual const char*
columnName( std::size_t idx)=0;
82 virtual bool next()=0;
virtual std::size_t nofColumns()=0
Get the number of columns of the last result.
Class for describing database errors.
Definition: databaseError.hpp:46
virtual bool rollback()=0
Rollback current transaction.
Error class for databases.
TransactionExecStatemachine()
Constructor.
Definition: transactionExecStatemachine.hpp:53
virtual ~TransactionExecStatemachine()
Destructor.
Definition: transactionExecStatemachine.hpp:56
virtual bool begin()=0
Begin transaction.
virtual bool start(const std::string &statement)=0
Start new command statement.
virtual const db::DatabaseError * getLastError()=0
Get the last database error as structure.
Variant value type that represents a variant copy without content ownership.
Definition: variant.hpp:286
virtual bool execute()=0
Execute instance of current statement.
virtual bool next()=0
Skip to the next row of the last result.
virtual const char * columnName(std::size_t idx)=0
Get a column title of the last result.
virtual bool isCaseSensitive()=0
Find out if the database is case sensitive or not.
boost::shared_ptr< TransactionExecStatemachine > TransactionExecStatemachineR
Definition: transactionExecStatemachine.hpp:91
virtual bool hasResult()=0
Evaluate if there is a result.
Interface to the database transaction execution statemechine.
Definition: transactionExecStatemachine.hpp:49
virtual const std::string & databaseID() const =0
Get database identifier.
virtual bool commit()=0
Commit current transaction.
virtual bool bind(std::size_t idx, const types::VariantConst &value)=0
Bind parameter value on current command statement.