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/ogr/SQLVisitor.h
22
23 \brief A visitor for building an SQL statement using OGR dialect.
24*/
25
26#ifndef __TERRALIB_OGR_INTERNAL_SQLVISITOR_H
27#define __TERRALIB_OGR_INTERNAL_SQLVISITOR_H
28
29// TerraLib
30#include "../dataaccess/query/SQLVisitor.h"
31#include "Config.h"
32
33namespace te
34{
35 namespace gm
36 {
37 // Forward declaration
38 class Envelope;
39 }
40
41 namespace ogr
42 {
43 /*!
44 \class SQLVisitor
45
46 \brief A visitor for building an SQL statement from a given Query hierarchy - OGR Driver
47
48 NOTE: When the DISTINCT keyword is used, only one attribute may appear in the field list.
49
50 */
51
53 {
54 public:
55 /*! \brief Default constructor. */
56 SQLVisitor(const te::da::SQLDialect& dialect, std::string& sql);
57
58 /*! \brief Destructor. */
60
61 void visit(const te::da::DataSetName& visited);
62
63 void visit(const te::da::LiteralEnvelope& visited);
64
65 void visit(const te::da::PropertyName& visited);
66
67 void visit(const te::da::Select& visited);
68
69 void visit(const te::da::Join& visited);
70
71 void visit(const te::da::JoinConditionOn& visited);
72
73 void visit(const te::da::LiteralBool& visited) override;
74
75 void visit(const te::da::LiteralString& visited) override;
76
77 void visit(const te::da::LiteralGeom& visited) override;
78
79 void visit(const te::da::LiteralDateTime& visited) override;
80
81 void visit(const te::da::In& visited) override;
82
84
85 protected:
86
88 };
89 }
90}
91
92
93#endif //__TERRALIB_OGR_INTERNAL_SQLVISITOR_H
A class that models the name of a dataset used in a From clause.
Definition: DataSetName.h:44
A class that represents the IN operator.
Definition: In.h:53
JoinConditionOn is a boolean expression and it specifies which items in a join are considered to matc...
A Join clause combines two FromItems.
Definition: Join.h:51
This class models a bool Literal value.
Definition: LiteralBool.h:44
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
This class models a string Literal value.
Definition: LiteralString.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
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:67
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
A visitor for building an SQL statement from a given Query hierarchy - OGR Driver.
Definition: SQLVisitor.h:53
SQLVisitor(const te::da::SQLDialect &dialect, std::string &sql)
Default constructor.
void visit(const te::da::Join &visited)
void visit(const te::da::LiteralGeom &visited) override
void visit(const te::da::In &visited) override
te::gm::Envelope * getMBR()
~SQLVisitor()
Destructor.
Definition: SQLVisitor.h:59
void visit(const te::da::LiteralEnvelope &visited)
te::gm::Envelope * m_bbox
Definition: SQLVisitor.h:87
void visit(const te::da::LiteralBool &visited) override
void visit(const te::da::PropertyName &visited)
void visit(const te::da::JoinConditionOn &visited)
void visit(const te::da::LiteralString &visited) override
void visit(const te::da::Select &visited)
void visit(const te::da::LiteralDateTime &visited) override
void visit(const te::da::DataSetName &visited)
TerraLib.
#define TEOGREXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:79
Proxy configuration file for TerraView (see terraview_config.h).