27 #include "../common/StringUtils.h"
28 #include "../geometry/Envelope.h"
29 #include "../dataaccess/query/DataSetName.h"
30 #include "../dataaccess/query/Having.h"
31 #include "../dataaccess/query/LiteralEnvelope.h"
32 #include "../dataaccess/query/PropertyName.h"
33 #include "../dataaccess/query/Select.h"
34 #include "../dataaccess/query/Where.h"
50 m_sql +=
"\'" + visited.
getName() +
"\'";
62 std::vector<std::string> values;
65 if(values.size() == 1)
68 m_sql += values[values.size() - 1];
73 m_sql +=
"SELECT FID, ";
const Distinct * getDistinct() const
It returns the Distinct modifier.
const std::string & getName() const
It returns the property name.
te::da::SQLDialect * dialect
const OrderBy * getOrderBy() const
It returns the list of expressions used to sort the output result.
A class that models the name of a dataset used in a From clause.
const GroupBy * getGroupBy() const
It returns the list of expressions used to condense the result set.
boost::ptr_vector< Expression > Distinct
A class that models a Distinct clause on a query.
A class that models the name of any property of an object.
te::gm::Envelope * getMBR()
It represents the SQL query dialect accepted by a given data source.
void visit(const te::da::DataSetName &visited)
const From * getFrom() const
It returns the list of source information to be used by the query.
void Tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
It tokenizes a given string with a delimiter of your own choice.
An Envelope defines a 2D rectangular region.
virtual void visit(const Expression &visited)
A visitor for building an SQL statement using OGR dialect.
Expression * getExp() const
const Fields * getFields() const
It returns the list of output expressions used to form the result set.
Expression * getExp() const
SQLVisitor(const te::da::SQLDialect &dialect, std::string &sql)
Default constructor.
A Select models a query to be used when retrieving data from a DataSource.
Where * getWhere() const
It returns the filter condition.
virtual ReturnType accept(VisitorType &guest) const =0
It call the visit method from the guest object.
const Having * getHaving() const
It returns the list of expressions used to eliminate group row that doesn't satisfy the condition...
A class that models a literal for Envelope values.
const std::string & getName() const
It returns the dataset name.
void visitDistinct(const te::da::Distinct &visited)
te::gm::Envelope * getValue() const
It returns the associated envelope value.