Main Page
Modules
Namespaces
Classes
Files
File List
File Members
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/postgis/SQLVisitor.h
22
23
\brief A visitor for building an SQL statement using PostGIS dialect.
24
*/
25
26
#ifndef __TERRALIB_POSTGIS_INTERNAL_SQLVISITOR_H
27
#define __TERRALIB_POSTGIS_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
// Forward declaration for libpq
37
extern
"C"
38
{
39
struct
pg_conn;
40
typedef
struct
pg_conn
PGconn
;
41
}
42
43
namespace
te
44
{
45
namespace
pgis
46
{
47
/*!
48
\class SQLVisitor
49
50
\brief A visitor for building an SQL statement using PostGIS dialect.
51
*/
52
class
TEPGISEXPORT
SQLVisitor
:
public
te::da::SQLVisitor
53
{
54
public
:
55
56
/** @name Initializer Methods
57
* Methods related to instantiation and destruction.
58
*/
59
//@{
60
61
/*! \brief Default constructor. */
62
SQLVisitor
(
const
te::da::SQLDialect
&
dialect
, std::string& sql,
PGconn
* conn);
63
64
/*! \brief Destructor. */
65
~SQLVisitor
() {}
66
67
//@}
68
69
/** @name Select
70
* All concrete visitors must implement these methods.
71
*/
72
//@{
73
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
visitDistinct(
const
te::da::Distinct
& visited);
79
80
//@}
81
82
private
:
83
84
PGconn
*
m_conn
;
//!< The PostGIS connection used to escape string!
85
};
86
87
}
// end namespace pgis
88
}
// end namespace te
89
90
#endif // __TERRALIB_POSTGIS_INTERNAL_SQLVISITOR_H
dialect
te::da::SQLDialect * dialect
Definition:
WFSDialect.h:1
te::pgis::SQLVisitor::~SQLVisitor
~SQLVisitor()
Destructor.
Definition:
SQLVisitor.h:65
te::da::Distinct
boost::ptr_vector< Expression > Distinct
A class that models a Distinct clause on a query.
Definition:
Distinct.h:37
te::pgis::SQLVisitor::m_conn
PGconn * m_conn
The PostGIS connection used to escape string!
Definition:
SQLVisitor.h:84
te::da::SQLDialect
It represents the SQL query dialect accepted by a given data source.
Definition:
SQLDialect.h:55
te::pgis::SQLVisitor
A visitor for building an SQL statement using PostGIS dialect.
Definition:
SQLVisitor.h:52
TEPGISEXPORT
#define TEPGISEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:195
te::da::LiteralDateTime
A class that models a literal for Date and Time values.
Definition:
LiteralDateTime.h:48
PGconn
struct pg_conn PGconn
Definition:
Connection.h:45
Config.h
Configuration flags for the PostGIS Driver Implementation of TerraLib.
te
URI C++ Library.
Definition:
AddressGeocodingOp.h:51
te::da::LiteralByteArray
A class that models a literal for ByteArray values.
Definition:
LiteralByteArray.h:48
te::da::LiteralEnvelope
A class that models a literal for Envelope values.
Definition:
LiteralEnvelope.h:51
te::da::SQLVisitor
A visitor for building an SQL statement from a given Query hierarchy.
Definition:
SQLVisitor.h:58
te::da::LiteralGeom
A class that models a literal for Geometry values.
Definition:
LiteralGeom.h:46
git_master
terralib5
src
terralib
postgis
SQLVisitor.h
Generated on Mon Feb 29 2016 13:55:41 for TerraLib by
1.8.9.1