BatchExecutor.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/sqlite/BatchExecutor.h
22 
23  \brief Implementation of the BatchExecutor class for the TerraLib SQLite Data Access driver.
24 */
25 
26 #ifndef __TERRALIB_SQLITE_INTERNAL_BATCHEXECUTOR_H
27 #define __TERRALIB_SQLITE_INTERNAL_BATCHEXECUTOR_H
28 
29 // TerraLib
30 #include "../dataaccess/datasource/BatchExecutor.h"
31 
32 // STL
33 #include <vector>
34 
35 namespace te
36 {
37  namespace sqlite
38  {
40 
42  {
43  public:
44 
46 
48 
49  void add(te::da::Query* q);
50 
51  void execute();
52 
53  void execute(const std::string& uri, const std::map<std::string, std::string>& options);
54 
55  void execute(std::istream& istr, const std::map<std::string, std::string>& options);
56 
58 
59  void add(std::string* sql);
60 
61  private:
62 
64 
65  std::vector<std::string*> m_commands;
66  };
67 
68  } // end namespace sqlite
69 } // end namespace te
70 
71 
72 #endif // __TERRALIB_SQLITE_INTERNAL_BATCHEXECUTOR_H
73 
74 
std::vector< std::string * > m_commands
Definition: BatchExecutor.h:65
~BatchExecutor()
Virtual destructor.
BatchExecutor()
Constructor.
Definition: BatchExecutor.h:60
URI C++ Library.
A class that models an object that submits commands in batch to the data source.
Definition: BatchExecutor.h:55
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
te::da::DataSourceTransactor * getTransactor() const
It returns a pointer to the underlying data source transactor.
DataSourceTransactor * m_t
Definition: BatchExecutor.h:63
void add(te::da::Query *q)
It adds the given statement to the list of commands to be executed.
A Query is independent from the data source language/dialect.
Definition: Query.h:46