Loading...
Searching...
No Matches
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
40namespace 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::Fields& visited);
73 void visit(const te::da::JoinConditionOn& visited);
74 void visit(const te::da::LiteralByteArray& visited);
75 void visit(const te::da::LiteralDateTime& visited);
76 void visit(const te::da::LiteralEnvelope& visited);
77 void visit(const te::da::LiteralGeom& visited);
78 void visit(const te::da::PropertyName& visited);
79
80 //@}
81
82 private:
83
84 _ConnectionPtr m_conn; //!< The ADO connection used to escape string!
85 };
86
87 } // end namespace ado
88} // end namespace te
89
90#endif // __TERRALIB_ADO_INTERNAL_SQLVISITOR_H
A visitor for building an SQL statement using ADO dialect.
Definition: SQLVisitor.h:50
void visit(const te::da::Fields &visited)
_ConnectionPtr m_conn
The ADO connection used to escape string!
Definition: SQLVisitor.h:84
void visit(const te::da::LiteralGeom &visited)
void visit(const te::da::LiteralEnvelope &visited)
~SQLVisitor()
Destructor.
Definition: SQLVisitor.h:62
void visit(const te::da::LiteralByteArray &visited)
void visit(const te::da::LiteralDateTime &visited)
void visit(const te::da::Function &visited)
void visit(const te::da::JoinConditionOn &visited)
SQLVisitor(const te::da::SQLDialect &dialect, std::string &sql, _ConnectionPtr conn)
Default constructor.
void visit(const te::da::PropertyName &visited)
A class that models a Function expression.
Definition: Function.h:48
JoinConditionOn is a boolean expression and it specifies which items in a join are considered to matc...
A class that models a literal for ByteArray values.
A class that models a literal for Date and Time values.
A class that models a literal for Envelope values.
A class that models a literal for Geometry values.
Definition: LiteralGeom.h:47
A class that models the name of any property of an object.
Definition: PropertyName.h:51
It represents the SQL query dialect accepted by a given data source.
Definition: SQLDialect.h:56
A visitor for building an SQL statement from a given Query hierarchy.
Definition: SQLVisitor.h:59
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
Definition: Fields.h:40
TerraLib.
#define TEADOEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:130
Proxy configuration file for TerraView (see terraview_config.h).