SQLVisitor.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/ado/SQLVisitor.h
22 
23  \brief A visitor for building an SQL statement using ADO dialect.
24 */
25 
26 #ifndef __TERRALIB_ADO_INTERNAL_SQLVISITOR_H
27 #define __TERRALIB_ADO_INTERNAL_SQLVISITOR_H
28 
29 // TerraLib
30 #include "../dataaccess/query/SQLVisitor.h"
31 #include "Config.h"
32 
33 // Boost
34 #include <boost/noncopyable.hpp>
35 
36 // ADO
37 #import "msado15.dll" \
38  no_namespace rename("EOF", "EndOfFile")
39 
40 namespace te
41 {
42  namespace ado
43  {
44  /*!
45  \class SQLVisitor
46 
47  \brief A visitor for building an SQL statement using ADO dialect.
48  */
50  {
51  public:
52 
53  /** @name Initializer Methods
54  * Methods related to instantiation and destruction.
55  */
56  //@{
57 
58  /*! \brief Default constructor. */
59  SQLVisitor(const te::da::SQLDialect& dialect, std::string& sql, _ConnectionPtr conn);
60 
61  /*! \brief Destructor. */
63 
64  //@}
65 
66  /** @name Select
67  * All concrete visitors must implement these methods.
68  */
69  //@{
70 
71  void visit(const te::da::Function& visited);
72  void visit(const te::da::LiteralByteArray& visited);
73  void visit(const te::da::LiteralDateTime& visited);
74  void visit(const te::da::LiteralEnvelope& visited);
75  void visit(const te::da::LiteralGeom& visited);
76  void visit(const te::da::PropertyName& visited);
77 
78  //@}
79 
80  private:
81 
82  _ConnectionPtr m_conn; //!< The ADO connection used to escape string!
83  };
84 
85  } // end namespace ado
86 } // end namespace te
87 
88 #endif // __TERRALIB_ADO_INTERNAL_SQLVISITOR_H
te::da::SQLDialect * dialect
Definition: WFSDialect.h:1
_ConnectionPtr m_conn
The ADO connection used to escape string!
Definition: SQLVisitor.h:82
A class that models the name of any property of an object.
Definition: PropertyName.h:50
#define TEADOEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:130
It represents the SQL query dialect accepted by a given data source.
Definition: SQLDialect.h:55
Configuration flags for the TerraLib ADO Data Access driver.
A class that models a literal for Date and Time values.
URI C++ Library.
A class that models a literal for ByteArray values.
A class that models a Function expression.
Definition: Function.h:47
A visitor for building an SQL statement using ADO dialect.
Definition: SQLVisitor.h:49
~SQLVisitor()
Destructor.
Definition: SQLVisitor.h:62
A class that models a literal for Envelope values.
A visitor for building an SQL statement from a given Query hierarchy.
Definition: SQLVisitor.h:58
A class that models a literal for Geometry values.
Definition: LiteralGeom.h:46