#include <BatchExecutor.h>
Public Member Functions | |
void | add (te::da::Query *q) |
It adds the given statement to the list of commands to be executed. More... | |
void | add (std::string *sql) |
BatchExecutor (DataSourceTransactor *t) | |
void | execute () |
void | execute (const std::string &uri, const std::map< std::string, std::string > &options) |
It executes a series of statements in the respource identified by the URI. More... | |
void | execute (std::istream &istr, const std::map< std::string, std::string > &options) |
It executes a series of statements from the input stream. More... | |
te::da::DataSourceTransactor * | getTransactor () const |
It returns a pointer to the underlying data source transactor. More... | |
~BatchExecutor () | |
Virtual destructor. More... | |
Private Attributes | |
std::vector< std::string * > | m_commands |
DataSourceTransactor * | m_t |
Definition at line 41 of file BatchExecutor.h.
te::sqlite::BatchExecutor::BatchExecutor | ( | DataSourceTransactor * | t | ) |
Definition at line 36 of file BatchExecutor.cpp.
|
virtual |
Virtual destructor.
Reimplemented from te::da::BatchExecutor.
Definition at line 41 of file BatchExecutor.cpp.
References te::common::FreeContents().
|
virtual |
It adds the given statement to the list of commands to be executed.
query | The query command to be added to the list of commands to be executed. |
Implements te::da::BatchExecutor.
Definition at line 46 of file BatchExecutor.cpp.
References te::common::BaseVisitable< T, R >::accept().
void te::sqlite::BatchExecutor::add | ( | std::string * | sql | ) |
Definition at line 96 of file BatchExecutor.cpp.
|
virtual |
Implements te::da::BatchExecutor.
Definition at line 58 of file BatchExecutor.cpp.
References te::da::ScopedTransaction::commit(), and te::common::FreeContents().
|
virtual |
It executes a series of statements in the respource identified by the URI.
uri | An URI with a resource with query statements. |
options | Optional parameters that can be used to refine the execution. |
Excpetion | It throws na exception if something goes wrong. |
Implements te::da::BatchExecutor.
Definition at line 73 of file BatchExecutor.cpp.
References te::da::ScopedTransaction::commit(), and te::sqlite::ExecuteScript().
|
virtual |
It executes a series of statements from the input stream.
istr | An input stream with query statements. |
options | Optional parameters that can be used to refine the execution. |
Excpetion | It throws na exception if something goes wrong. |
Implements te::da::BatchExecutor.
Definition at line 82 of file BatchExecutor.cpp.
References te::da::ScopedTransaction::commit(), and te::sqlite::PerformCommands().
|
virtual |
It returns a pointer to the underlying data source transactor.
Implements te::da::BatchExecutor.
Definition at line 91 of file BatchExecutor.cpp.
|
private |
Definition at line 65 of file BatchExecutor.h.
|
private |
Definition at line 63 of file BatchExecutor.h.