28 #ifndef __TERRALIB_DATAACCESS_INTERNAL_DATAACCESS_H
29 #define __TERRALIB_DATAACCESS_INTERNAL_DATAACCESS_H
31 #include "../Config.h"
34 #include "../../datatype/AbstractData.h"
35 #include "../datasource/DataSource.h"
36 #include "../datasource/DataSourceTransactor.h"
62 class DataSetTypeConverter;
240 std::unique_ptr<te::da::DataSet>
query(
const std::string& query);
A class to store the proxy information that must be used to access data located in URIs.
DataAccessPtr(te::da::DataAccess *dataAccess=nullptr)
DataAccessSharedPtr(te::da::DataAccess *dataAccess=nullptr)
Class used to centralize and control access to data in terralib. It aims to create a high-level inter...
te::da::Select * getQuery() const
Get query object.
te::gm::Envelope getMBR() const
Gets the MBR of the data access.
std::string getStrQuery() const
Get query object as string.
void saveDataSet(te::da::DataSet *dataSet, bool enableProgress=true)
Function used to save data into internal datasource (if a converter was defined, it will be used)
std::unique_ptr< te::da::DataSetTypeConverter > m_dataSetTypeConverter
DataSetType Converter.
void execute(const std::string &query)
Executes the given sql in the current transactor.
te::da::DataSourcePtr m_dataSource
Data source.
te::da::DataSetTypeConverter * getConverter() const
Get data set type.
virtual std::string toString() const override
Check if the the dataSet exists.
const te::da::DataSetType * getDataSetType() const
Get data set type.
void setQuery(te::da::Select *select)
Set data set restriction.
std::string getDataSourceConnectionInfo() const
Get data source connection info.
void setTransactor(te::da::DataSourceTransactorPtr transactor)
void rollbackTransaction()
When handling with files, specially using OGR, the olnly way to ensure the data is writen tis to clos...
te::da::Literal * getLiteral(const std::string &attributeName, const std::string &value)
It creates a Literal Expression based on a attribute type.
virtual ~DataAccess()
Default destructor.
bool dataSetExists() const
std::unique_ptr< te::da::ObjectIdSet > m_objectIdSetFilter
A optional filter containg an objectId set.
std::unique_ptr< te::da::DataSet > getDataSet(const te::da::Expression *filter) const
Get dataset using internal information (data source, query, datasetTypeConverter),...
void createDataSet(te::da::DataSetType *dataSetType)
Function used to create a new DataSet into internal datasource. This class will NOT take the ownershi...
std::vector< std::string > getDistinctValues(const std::string &attributeName)
Function used to get distinct values ir order, from a specific attribute.
DataAccess(const te::da::DataAccess &rhs)
void beginTransaction()
Commits a transaction.
te::da::DataSourceTransactorPtr getTransactor() const
Sets he transactor to be used.
void setObjectIdSetFilter(const te::da::ObjectIdSet *objectIdSetFilter)
Gets the current transactor. If no transactor is defined, it creates one.
std::string m_dataSetName
Dataset name.
std::string getDataSetName() const
Get data set name.
void setConverter(te::da::DataSetTypeConverter *converter)
Set data set converter type.
te::da::DataSourcePtr getDataSource() const
Get the data source associated with this data access.
virtual int getTypeCode() const override
It returns the data type code associated to the data value.
te::da::DataSourceTransactorPtr m_transactor
Transactor.
virtual te::dt::AbstractData * clone() const override
Begins a transaction.
std::unique_ptr< te::da::DataSet > query(const te::da::Select &select)
Get dataset using internal information (data source, datasetTypeConverter), but using query parameter...
DataAccess(const te::core::URI &uri, const std::string &dataSourceDriver, const std::string &dataSetName="")
constructor.
void commitTransaction()
Rollbacks the transaction.
std::unique_ptr< te::da::DataSetType > m_dataSetType
Data set type.
std::unique_ptr< te::da::DataSet > getDataSet() const
Get dataset using internal information (data source, query, datasetTypeConverter)
std::unique_ptr< te::da::DataSet > query(const std::string &query)
DataAccess(te::da::DataSourcePtr dataSource, const te::da::DataSetType *dataSetType)
constructor.
DataAccess(te::da::DataSourcePtr dataSource, const std::string &dataSetName="")
Constructor.
int getSRID() const
Gets the SRID of the data access.
std::unique_ptr< te::da::Select > m_dataSetQuery
Filter used to load data with restriction.
An converter for DataSetType.
A class that models the description of a dataset.
A dataset is the unit of information manipulated by the data access module of TerraLib.
This is an abstract class that models a query expression.
This class models a literal value.
This class represents a set of unique ids created in the same context. i.e. from the same data set.
A Select models a query to be used when retrieving data from a DataSource.
A base class for values that can be retrieved from the data access module.
An Envelope defines a 2D rectangular region.
boost::shared_ptr< DataSourceTransactor > DataSourceTransactorPtr
boost::shared_ptr< DataSource > DataSourcePtr
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.