An abstract statement class which allows derived classes to provide a simple escaping function which encodes the data which is stored directly in the SQL statement.
More...
#include <substitutingStatement.hpp>
|
virtual const std::string | convert (const types::Variant &value) const =0 |
| Function to convert and escape a variant, if single quotes are need, the function should also return those, care must be taken to use the database escape functions to escape the values here (beware of SQL code injection!) More...
|
|
virtual const std::string | replace (const unsigned int idx) const |
| 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...
|
|
|
std::map< unsigned int,
std::string > | m_bind |
| Stores the placeholders in calls of bind till they are used to create the substituted SQL statement with the embedded data. More...
|
|
An abstract statement class which allows derived classes to provide a simple escaping function which encodes the data which is stored directly in the SQL statement.
_Wolframe::db::SubstitutingStatement::SubstitutingStatement |
( |
| ) |
|
virtual void _Wolframe::db::SubstitutingStatement::bind |
( |
const unsigned int |
idx, |
|
|
const types::Variant & |
arg |
|
) |
| |
|
virtual |
Binds parameter at position idx with variant data in the format with Wolframe placeholders.
Reimplemented from _Wolframe::db::BaseStatement.
virtual void _Wolframe::db::SubstitutingStatement::clear |
( |
| ) |
|
|
virtual |
virtual const std::string _Wolframe::db::SubstitutingStatement::convert |
( |
const types::Variant & |
value | ) |
const |
|
protectedpure virtual |
Function to convert and escape a variant, if single quotes are need, the function should also return those, care must be taken to use the database escape functions to escape the values here (beware of SQL code injection!)
virtual void _Wolframe::db::SubstitutingStatement::init |
( |
const std::string & |
stmtStr | ) |
|
|
virtual |
virtual const std::string _Wolframe::db::SubstitutingStatement::replace |
( |
const unsigned int |
idx | ) |
const |
|
protectedvirtual |
Funtion called when the placeholder should be put into the final string (this is either for subsituting data or rewrite placeholders to native syntax)
Implements _Wolframe::db::Statement.
std::map< unsigned int, std::string > _Wolframe::db::SubstitutingStatement::m_bind |
|
private |
Stores the placeholders in calls of bind till they are used to create the substituted SQL statement with the embedded data.
The documentation for this class was generated from the following file: