|
lintel 0.2.0
|
#include <PreparedStatement.h>
Public Member Functions | |
| PreparedStatement (Connection &connection, const std::string &statement, const std::string &statementName) | |
| ~PreparedStatement () | |
| std::shared_ptr< Result > | execute (const std::vector< std::string > ¶ms) |
| void | close () |
format of prepared statement example: insert into table (..,..) values(?,?);
=> ? will be replace automatically with $1 and $2 => algorithm will automatically count the number of parameters
| lintel::sqlite::PreparedStatement::PreparedStatement | ( | Connection & | connection, |
| const std::string & | statement, | ||
| const std::string & | statementName | ||
| ) |
Prepares a statement on the given connection.
| connection | the SQLite connection |
| statement | the SQL statement template with '?' placeholders |
| statementName | the name for the prepared statement |
| lintel::sqlite::PreparedStatement::~PreparedStatement | ( | ) |
| void lintel::sqlite::PreparedStatement::close | ( | ) |
Closes the prepared statement.
| std::shared_ptr< Result > lintel::sqlite::PreparedStatement::execute | ( | const std::vector< std::string > & | params | ) |
Executes the prepared statement with the given parameters.
| params | the parameter values as strings |