37 #ifndef _DATABASE_BASE_STATEMENT_HPP_INCLUDED
38 #define _DATABASE_BASE_STATEMENT_HPP_INCLUDED
59 virtual void init(
const std::string &stmtStr );
61 virtual void clear( );
63 virtual void substitute(
bool checkForMissingPlaceholders =
true );
69 virtual const std::string
nativeSQL( )
const;
90 typedef std::pair<unsigned int, std::string>
Element;
virtual void substitute(bool checkForMissingPlaceholders=true)
Trigger substitution (nativeSQL is valid after this call and not before!)
std::string m_stmtStr
The original SQL.
Definition: baseStatement.hpp:73
The interface of a statement SQL parameter substutution class.
Definition: statement.hpp:48
virtual const std::string nativeSQL() const
Returns the SQL statement with the native database placeholders or the data filled in (this is up to ...
std::bitset< MaxNofParams > m_setIdx
Remembers the placeholders bound to actual data.
Definition: baseStatement.hpp:102
The interface of an SQL statement parameter substutution class.
std::vector< Element > m_data
Remembers positions and parts of SQL snippets.
Definition: baseStatement.hpp:93
Forward declaration.
Definition: variant.hpp:65
virtual void init(const std::string &stmtStr)
Set new SQL statement.
virtual void bind(const unsigned int idx, const types::Variant &value)
Binds parameter at position idx with variant data in the format with Wolframe placeholders.
virtual void clear()
Clear current statement.
unsigned int m_maxParam
The maximum number of parsed placeholders so far.
Definition: baseStatement.hpp:76
Definition: baseStatement.hpp:87
std::bitset< MaxNofParams > m_usedIdx
Remembers the indexes used in the SQL statement.
Definition: baseStatement.hpp:99
virtual const std::string originalSQL() const
Returns the SQL statement as passed down to the database layer.
std::string m_nativeStmt
The SQL statement as understood by the database.
Definition: baseStatement.hpp:96
std::pair< unsigned int, std::string > Element
Definition: baseStatement.hpp:90
Implements basic parsing of the Wolframe SQL statement with placeholders, derived classes can steer h...
Definition: baseStatement.hpp:52