Loading...
Searching...
No Matches
sqlite::execute Struct Reference

execute can be used for SQL commands which should executed the constructor is defined in a way that it can be used like a function An object of this class is not copyable More...

`#include <execute.hpp>`

Inheritance diagram for sqlite::execute:
Collaboration diagram for sqlite::execute:

## Public Member Functions

| execute (connection &con, std::string const &sql, bool immediately=false)
| constructor
virtual | ~execute ()
| destructor
Public Member Functions inherited from sqlite::command
| command (connection &con, std::string const &sql)
| command constructor
virtual | ~command ()
| command destructor
void | clear ()
| clear is used if you'd like to reuse a command object
bool | emit ()
| emit executes the sql command If you have used placeholders you must have replaced all placeholders
bool | operator() ()
| works exactly like the method command::emit
void | bind (int idx)
| binds NULL to the given 1 based index
void | bind (int idx, int v)
| binds the 32-Bit integer v to the given 1 based index
void | bind (int idx, boost::int64_t v)
| binds the 64-Bit integer v to the given 1 based index
void | bind (int idx, double v)
| binds the double v to the given 1 based index
void | bind (int idx, std::string const &v)
| binds the text/string v to the given 1 based index
void | bind (int idx, void const *buf, size_t buf_size)
| binds the binary/blob buf to the given 1 based index
void | bind (int idx, std::vector< unsigned char > const &v)
| binds the binary/blob v to the given 1 based index
command & | operator% (null_type const &p)
| replacement for void command::bind(int idx); To use this operator% you have to use the global object nil Indexes are given automatically first call uses 1 as index, second 2 and so on
command & | operator% (int p)
| replacement for void command::bind(int idx,int); Indexes are given automatically first call uses 1 as index, second 2 and so on
command & | operator% (boost::int64_t p)
| replacement for void command::bind(int idx,boost::int64_t); Indexes are given automatically first call uses 1 as index, second 2 and so on
command & | operator% (double p)
| replacement for void command::bind(int idx,double); Indexes are given automatically first call uses 1 as index, second 2 and so on
command & | operator% (std::string const &p)
| replacement for void command::bind(int idx,std::string const&); Indexes are given automatically first call uses 1 as index, second 2 and so on
command & | operator% (std::vector< unsigned char > const &p)
| replacement for void command::bind(int idx,std::vector<unsigned char> const&); Indexes are given automatically first call uses 1 as index, second 2 and so on

## Additional Inherited Members

Protected Member Functions inherited from sqlite::command
void | access_check ()
bool | step ()
struct sqlite3 * | get_handle ()
Protected Attributes inherited from sqlite::command
sqlite3_stmt * | stmt

## Detailed Description

execute can be used for SQL commands which should executed the constructor is defined in a way that it can be used like a function An object of this class is not copyable

Definition at line 43 of file execute.hpp.

## Constructor & Destructor Documentation

## execute()

sqlite::execute::execute | ( | connection & | con,
|  | std::string const & | sql,
|  | bool | immediately = false )

constructor

Parameters

  con | reference to the connection object which should be used
  sql | the SQL statement which should be executed
  immediately | if it is true the sql command will be immediately executed if it is false the command will be executed after an emit or operator() call

## ~execute()

virtual sqlite::execute::~execute | ( |  | ) |

virtual

destructor

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

- include/sqlite/execute.hpp