27 #include "../common/STLUtils.h"
28 #include "../dataaccess/datasource/ScopedTransaction.h"
29 #include "../dataaccess/query/Query.h"
48 std::auto_ptr<te::da::Query> qq(q);
50 std::auto_ptr<std::string> sql(
new std::string);
52 SQLVisitor visitor(*(m_t->getDataSource()->getDialect()), *sql);
55 m_commands.push_back(sql.release());
62 const std::size_t ncommands = m_commands.size();
64 for(std::size_t i = 0; i < ncommands; ++i)
65 m_t->execute(*m_commands[i]);
98 m_commands.push_back(sql);
Implementation of the BatchExecutor class for the TerraLib SQLite Data Access driver.
An implementation of DataSourceTransactor class for the TerraLib SQLite Data Access Driver...
A visitor for building an SQL statement using SQLite dialect.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
An utility class to coordinate transactions.
Implements the DataSource class for the SQLite Data Access Driver.
void add(te::da::Query *q)
It adds the given statement to the list of commands to be executed.
void commit()
It commits the transaction.
A visitor for building an SQL statement using SQLite dialect.
void PerformCommands(sqlite3 *db, std::istream &istr)
void ExecuteScript(sqlite3 *db, const char *fileName)
A Query is independent from the data source language/dialect.
Utility functions for the TerraLib SQLite Data Access driver.
te::da::DataSourceTransactor * getTransactor() const
It returns a pointer to the underlying data source transactor.
~BatchExecutor()
Virtual destructor.
BatchExecutor()
Constructor.
virtual ReturnType accept(VisitorType &guest) const =0
It call the visit method from the guest object.
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...