26 #ifndef __TERRALIB_POSTGIS_INTERNAL_TRANSACTOR_H    27 #define __TERRALIB_POSTGIS_INTERNAL_TRANSACTOR_H    30 #include "../dataaccess/datasource/DataSourceTransactor.h"    42   namespace dt { 
class Property; }
    43   namespace gm { 
class Envelope; 
class Geometry; }
    54     class ScopedConnection;
    87         Connection* getConnection(
const int& 
id = -1) 
const;
    96         int getConnectionID() 
const;
   104         bool isInTransaction() 
const;
   106         std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
   108                                                   bool isConnected = 
false,
   111         std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
   112                                                   const std::string& propertyName,
   116                                                   bool isConnected = 
false,
   119         std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
   120                                                   const std::string& propertyName,
   124                                                   bool isConnected = 
false,
   129                                              bool connected = 
false,
   133         std::unique_ptr<te::da::DataSet> query(
const std::string& query, 
   135                                              bool connected = 
false,
   140         void execute(
const std::string& command);
   142         std::unique_ptr<te::da::PreparedQuery> getPrepared(
const std::string& qName = std::string(
""));
   144         std::unique_ptr<te::da::BatchExecutor> getBatchExecutor();
   148         boost::int64_t getLastGeneratedId();
   150         std::string escape(
const std::string& value);
   152         std::vector<std::string> getDataSetNames();
   154         std::size_t getNumberOfDataSets();
   156         std::unique_ptr<te::da::DataSetType> getDataSetType(
const std::string& name);
   158         boost::ptr_vector<te::dt::Property> getProperties(
const std::string& datasetName);
   160         std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName, 
const std::string& name);
   162         std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName, std::size_t propertyPos);
   164         std::vector<std::string> getPropertyNames(
const std::string& datasetName);
   166         std::size_t getNumberOfProperties(
const std::string& datasetName);
   168         bool propertyExists(
const std::string& datasetName, 
const std::string& name);
   172         void dropProperty(
const std::string& datasetName, 
const std::string& name);
   174         void renameProperty(
const std::string& datasetName,
   175                                     const std::string& propertyName,
   176                                     const std::string& newPropertyName);
   179         void changePropertyDefinition(
const std::string& datasetName, 
const std::string& propName, 
te::dt::Property* newProp);
   182         std::unique_ptr<te::da::PrimaryKey> getPrimaryKey(
const std::string& datasetName);
   184         bool primaryKeyExists(
const std::string& datasetName, 
const std::string& name);
   188         void dropPrimaryKey(
const std::string& datasetName);
   190         std::unique_ptr<te::da::ForeignKey> getForeignKey(
const std::string& datasetName, 
const std::string& name);
   192         std::vector<std::string> getForeignKeyNames(
const std::string& datasetName);
   194         bool foreignKeyExists(
const std::string& datasetName, 
const std::string& name);
   198         void dropForeignKey(
const std::string& datasetName, 
const std::string& fkName);
   200         std::unique_ptr<te::da::UniqueKey> getUniqueKey(
const std::string& datasetName, 
const std::string& name);
   202         std::vector<std::string> getUniqueKeyNames(
const std::string& datasetName);
   204         bool uniqueKeyExists(
const std::string& datasetName, 
const std::string& name);
   208         void dropUniqueKey(
const std::string& datasetName, 
const std::string& name);
   210         std::unique_ptr<te::da::CheckConstraint> getCheckConstraint(
const std::string& datasetName, 
const std::string& name);
   212         std::vector<std::string> getCheckConstraintNames(
const std::string& datasetName);
   214         bool checkConstraintExists(
const std::string& datasetName, 
const std::string& name);
   218         void dropCheckConstraint(
const std::string& datasetName, 
const std::string& name);
   220         std::unique_ptr<te::da::Index> getIndex(
const std::string& datasetName, 
const std::string& name);
   222         std::vector<std::string> getIndexNames(
const std::string& datasetName);
   224         bool indexExists(
const std::string& datasetName, 
const std::string& name);
   226         void addIndex(
const std::string& datasetName, 
te::da::Index* idx,
   227                               const std::map<std::string, std::string>& options); 
   229         void dropIndex(
const std::string& datasetName, 
const std::string& idxName);
   231         std::unique_ptr<te::da::Sequence> getSequence(
const std::string& name);
   233         std::vector<std::string> getSequenceNames();
   235         bool sequenceExists(
const std::string& name);
   239         void dropSequence(
const std::string& name);
   241         std::unique_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
   242                                                   const std::string& propertyName);
   244         std::unique_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
   245                                                           std::size_t propertyPos);
   247         std::size_t getNumberOfItems(
const std::string& datasetName);
   251         bool dataSetExists(
const std::string& name);
   253         void createDataSet(
te::da::DataSetType* dt, 
const std::map<std::string, std::string>& options);
   255         void cloneDataSet(
const std::string& name,
   256                           const std::string& cloneName,
   257                           const std::map<std::string, std::string>& options);
   259         void dropDataSet(
const std::string& name);
   261         void renameDataSet(
const std::string& name, 
const std::string& newName);
   263         void add(
const std::string& datasetName,
   265                  const std::map<std::string, std::string>& options,
   266                  std::size_t limit = 0,
   267                  bool enableProgress = 
true);
   271         void update(
const std::string& datasetName,
   273                     const std::vector<std::size_t>& properties,
   275                     const std::map<std::string, std::string>& options,
   276                     std::size_t limit = 0);
   278         void update(
const std::string& datasetName,
   280                     const std::vector< std::set<int> >& properties,
   281                     const std::vector<size_t>& ids);
   283         void optimize(
const std::map<std::string, std::string>& opInfo);
   294         unsigned int getGeomTypeId();
   305         unsigned int getRasterTypeId();
   316         void getDatabaseInfo(std::string& currentSchema);
   345         std::string getFullName(
const std::string& name);
   358         unsigned int getDataSetId(
const std::string& datasetName);
   371         std::string getDataSetName(
unsigned int id);
   396         std::unique_ptr<te::da::DataSet> getPropertiesInfo(
const std::string& datasetName);
   419         std::unique_ptr<te::dt::Property> getProperty(
unsigned int pid, 
const std::string& datasetName);
   446         std::unique_ptr<te::da::DataSet> getConstraints(
const std::string& datasetName, 
char conType = 
'\0');
   475         std::vector<te::da::Sequence*> getSequences();
   491 #endif  // __TERRALIB_POSTGIS_INTERNAL_TRANSACTOR_H 
A class that models the description of a dataset. 
 
SpatialRelation
Spatial relations between geometric objects. 
 
It describes a sequence (a number generator). 
 
A class that implements a connection to a PostgreSQL database. 
 
A class that describes a check constraint. 
 
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
 
int m_connectionId
The connection id used by this transactor. 
 
bool m_getConstraints
Flag that defines if the method getConstraints must be called. 
 
It models a property definition. 
 
#define TEPGISEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
The transactor class for the PostGIS driver. 
 
AccessPolicy
Supported data access policies (can be used as bitfield). 
 
TraverseType
A dataset can be traversed in two ways: 
 
An Envelope defines a 2D rectangular region. 
 
This class represents a set of unique ids created in the same context. i.e. from the same data set...
 
Configuration flags for the PostGIS Driver Implementation of TerraLib. 
 
It models a foreign key constraint for a DataSetType. 
 
It describes a unique key (uk) constraint. 
 
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
 
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards. 
 
A Select models a query to be used when retrieving data from a DataSource. 
 
Implementation of the data source for the PostGIS driver. 
 
boost::shared_ptr< Transactor > TransactorPtr
 
A dataset is the unit of information manipulated by the data access module of TerraLib. 
 
bool m_isInTransaction
Tells if there is a transaction in progress. 
 
It describes a primary key (pk) constraint. 
 
const int m_fetchSize
The size of cursor fetch. 
 
A Query is independent from the data source language/dialect. 
 
It describes an index associated to a DataSetType. 
 
DataSource * m_ds
The PostGIS data source associated to this transactor.