27 #include "../../common/Translator.h"
28 #include "../../geometry/GeometryProperty.h"
29 #include "../../datatype/Property.h"
30 #include "../dataset/DataSetTypeCapabilities.h"
31 #include "../dataset/ObjectIdSet.h"
32 #include "../query/DataSetName.h"
33 #include "../query/Field.h"
34 #include "../query/Fields.h"
35 #include "../query/Select.h"
36 #include "../query/Where.h"
37 #include "../utils/Utils.h"
38 #include "../Exception.h"
39 #include "../utils/Utils.h"
57 assert(!name.empty());
59 assert(oids->
size() > 0);
75 from->push_back(fromItem);
78 std::auto_ptr<Select> select(
new Select(all, from, filter));
80 std::auto_ptr<te::da::DataSet> result = query(select.get(), travType, connected);
99 const std::vector<size_t>& )
101 throw te::da::Exception(
"Operation not implemented for this data source");
106 std::string invalidChar;
112 std::string invalidChar;
A class that informs what kind of constraint and index is supported by a given data source...
An abstract class that models a source of data in a query.
The Field class can be used to model an expression that takes part of the output items of a SELECT...
A class that models the name of a dataset used in a From clause.
DataSourceTransactor()
Default constructor that can be called by subclasses.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
virtual void changePropertyDefinition(const std::string &datasetName, const std::string &propName, te::dt::Property *newProp)
It models a property definition.
This is an abstract class that models a query expression.
virtual bool isPropertyNameValid(const std::string &propertyName)
It checks if the given property name is valid.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
virtual ~DataSourceTransactor()
Virtual destructor.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
std::size_t size() const
It returns the object id set size.
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
A class that can be used to model a filter expression that can be applied to a query.
virtual std::auto_ptr< te::da::DataSetTypeCapabilities > getCapabilities(const std::string &name)
It gets capabilities about a data set.
A Select models a query to be used when retrieving data from a DataSource.
boost::ptr_vector< FromItem > From
It models the FROM clause for a query.
A dataset is the unit of information manipulated by the data access module of TerraLib.
virtual void update(const std::string &datasetName, DataSet *dataset, const std::vector< std::size_t > &properties, const ObjectIdSet *oids, const std::map< std::string, std::string > &options, std::size_t limit=0)=0
It updates the contents of a dataset for the set of data items.
TEDATAACCESSEXPORT bool IsValidName(const std::string &name, std::string &invalidChar)
It checks if the name is not valid as the existence of invalid characters, reserved words...
virtual std::auto_ptr< DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)=0
It gets the dataset identified by the given name. A dataset can be connected or disconnected. A connected dataset, after its creation through the data source transactor, continues to depend on the connection given by its associated data source. Differently, a disconnected dataset, after its creation, no more depends of the connection given by the data source, and it continues to live after the connection has been released to the data source.
Expression * getExpression() const
It returns the expression that can be used to retrieve the data set that contains the all indentified...
virtual bool isDataSetNameValid(const std::string &datasetName)
It returns true if the given string is a valid dataset name.