Wolframe, 0.0.3

_Wolframe::db::Statement Class Referenceabstract

The interface of a statement SQL parameter substutution class. More...

#include <statement.hpp>

Inheritance diagram for _Wolframe::db::Statement:
_Wolframe::db::BaseStatement _Wolframe::db::SubstitutingStatement

Public Member Functions

virtual ~Statement ()
 
virtual void bind (const unsigned int idx, const types::Variant &arg)=0
 Binds parameter at position idx with variant data in the format with Wolframe placeholders. More...
 
virtual const std::string originalSQL () const =0
 Returns the SQL statement as passed down to the database layer. More...
 
virtual const std::string nativeSQL () const =0
 Returns the SQL statement with the native database placeholders or the data filled in (this is up to the derived classes). More...
 
virtual void init (const std::string &stmtStr)=0
 Set new SQL statement. More...
 
virtual void clear ()=0
 Clear current statement. More...
 
virtual void substitute (bool checkForMissingPlaceholders=true)=0
 Trigger substitution (nativeSQL is valid after this call and not before!) More...
 
virtual const std::string replace (const unsigned int idx) const =0
 Funtion called when the placeholder should be put into the final string (this is either for subsituting data or rewrite placeholders to native syntax) More...
 

Detailed Description

The interface of a statement SQL parameter substutution class.

Constructor & Destructor Documentation

virtual _Wolframe::db::Statement::~Statement ( )
inlinevirtual

Member Function Documentation

virtual void _Wolframe::db::Statement::bind ( const unsigned int  idx,
const types::Variant arg 
)
pure virtual

Binds parameter at position idx with variant data in the format with Wolframe placeholders.

Implemented in _Wolframe::db::BaseStatement, and _Wolframe::db::SubstitutingStatement.

virtual void _Wolframe::db::Statement::clear ( )
pure virtual

Clear current statement.

Implemented in _Wolframe::db::SubstitutingStatement, and _Wolframe::db::BaseStatement.

virtual void _Wolframe::db::Statement::init ( const std::string &  stmtStr)
pure virtual

Set new SQL statement.

Implemented in _Wolframe::db::SubstitutingStatement, and _Wolframe::db::BaseStatement.

virtual const std::string _Wolframe::db::Statement::nativeSQL ( ) const
pure virtual

Returns the SQL statement with the native database placeholders or the data filled in (this is up to the derived classes).

Implemented in _Wolframe::db::BaseStatement.

virtual const std::string _Wolframe::db::Statement::originalSQL ( ) const
pure virtual

Returns the SQL statement as passed down to the database layer.

Implemented in _Wolframe::db::BaseStatement.

virtual const std::string _Wolframe::db::Statement::replace ( const unsigned int  idx) const
pure virtual

Funtion called when the placeholder should be put into the final string (this is either for subsituting data or rewrite placeholders to native syntax)

Implemented in _Wolframe::db::SubstitutingStatement.

virtual void _Wolframe::db::Statement::substitute ( bool  checkForMissingPlaceholders = true)
pure virtual

Trigger substitution (nativeSQL is valid after this call and not before!)

Parameters
[in]checkForMissingPlaceholderswhether the function should already check the validity and cardinality of the placeholders in the SQL statement

Implemented in _Wolframe::db::BaseStatement.


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