25 #ifndef __TERRALIB_GDAL_INTERNAL_TRANSACTOR_H    26 #define __TERRALIB_GDAL_INTERNAL_TRANSACTOR_H    29 #include "../dataaccess/datasource/DataSourceTransactor.h"    36 #include <boost/filesystem.hpp>    37 #include <boost/ptr_container/ptr_vector.hpp>    38 #include <boost/shared_ptr.hpp>    77       std::vector<std::string> getDataSetNames();
    79       std::size_t getNumberOfDataSets();      
    81       std::unique_ptr<te::da::DataSetType> getDataSetType(
const std::string& name);
    83       boost::ptr_vector<te::dt::Property> getProperties(
const std::string& datasetName);
    85       std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName, 
const std::string& name);
    87       std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName, std::size_t propertyPos);
    89       std::vector<std::string> getPropertyNames(
const std::string& datasetName);
    91       std::size_t getNumberOfProperties(
const std::string& datasetName);
    93       bool propertyExists(
const std::string& datasetName, 
const std::string& name);
    95       bool propertyExists(
const std::string& datasetName, 
size_t propertyPos);
   101       void renameProperty(
const std::string& , 
const std::string& , 
const std::string& ) {}
   103       std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name, 
   105                                                 bool connected = 
false,
   108       std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
   109                                                 const std::string& propertyName,
   113                                                 bool connected = 
false,
   116       std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
   117                                                 const std::string& propertyName,
   121                                                 bool connected = 
false,
   124       std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
   127                                                 bool connected = 
false,
   132                                            bool connected = 
false,
   135       std::unique_ptr<te::da::DataSet> query(
const std::string& query,
   137                                    bool connected = 
false,
   144       bool dataSetExists(
const std::string& name);
   147                          const std::map<std::string, std::string>& options);
   149       void cloneDataSet(
const std::string& name,
   150                         const std::string& cloneName,
   151                         const std::map<std::string, std::string>& options) ;
   153       void dropDataSet(
const std::string& name);
   155       void renameDataSet(
const std::string& name,
   156                          const std::string& newName);
   158       void add(
const std::string& ,
   160                const std::map<std::string, std::string>& ,
   164       void remove(
const std::string& ,
   169                   const std::vector<std::size_t>& ,
   171                   const std::map<std::string, std::string>& ,
   174       std::unique_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
   175                                                 const std::string& propertyName);
   177       std::unique_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
   178                                                 std::size_t propertyPos);
   192       std::unique_ptr<te::da::PreparedQuery> 
getPrepared(
const std::string& ) { 
return std::unique_ptr<te::da::PreparedQuery>(); }
   194       std::unique_ptr<te::da::BatchExecutor> 
getBatchExecutor() { 
return std::unique_ptr<te::da::BatchExecutor>(); }
   200       std::string 
escape(
const std::string& ) { 
return std::string(
""); }
   203       { 
return std::unique_ptr<te::da::PrimaryKey>(); }
   211       std::unique_ptr<te::da::ForeignKey> 
getForeignKey(
const std::string& , 
const std::string& ) { 
return std::unique_ptr<te::da::ForeignKey>(); }
   213       std::vector<std::string> 
getForeignKeyNames(
const std::string& ) { 
return std::vector<std::string>(); }
   221       std::unique_ptr<te::da::UniqueKey> 
getUniqueKey(
const std::string& , 
const std::string& ) 
   222       { 
return std::unique_ptr<te::da::UniqueKey>(); }
   225       { 
return std::vector<std::string>(); }
   233       std::unique_ptr<te::da::CheckConstraint> 
getCheckConstraint(
const std::string& , 
const std::string& ) 
   234       { 
return std::unique_ptr<te::da::CheckConstraint>(); }
   237       { 
return std::vector<std::string>(); }
   245       std::unique_ptr<te::da::Index> 
getIndex(
const std::string& , 
const std::string& ) 
   246       { 
return std::unique_ptr<te::da::Index>(); }
   249       { 
return std::vector<std::string>(); }
   256       void dropIndex(
const std::string& , 
const std::string& ) {}
   261       std::unique_ptr<te::da::Sequence> 
getSequence(
const std::string& )
   262       { 
return std::unique_ptr<te::da::Sequence>(); }
   265       { 
return std::vector<std::string>(); }
   271       void optimize(
const std::map<std::string, std::string>& ){}
   276       std::unique_ptr<te::da::DataSetType> getType(
const std::string& dsfullname);  
   277       void getDataSetNames(
const std::string& source, std::vector<std::string>& dsnames);
   278       bool hasDataSets(
const std::string& source);
   279       size_t getNumberOfDataSets(
const std::string& source);
   280       std::unique_ptr<te::da::DataSetType> getDataSetType(
const std::string& source, 
const std::string& name, std::string& uri);
   286 #endif // __TERRALIB_GDAL_INTERNAL_TRANSACTOR_H void dropProperty(const std::string &, const std::string &)
It removes a property from the given dataset. 
 
bool indexExists(const std::string &, const std::string &)
It checks if an index with the given name exists in the dataset. 
 
void addUniqueKey(const std::string &, te::da::UniqueKey *)
It adds a unique key constraint to the dataset. 
 
std::vector< std::string > getUniqueKeyNames(const std::string &)
It gets the unique key names of the given dataset. 
 
void rollBack()
It aborts the transaction. Any changes will be rolled-back. 
 
boost::shared_ptr< DataSetType > DataSetTypePtr
 
void execute(const te::da::Query &)
It executes the specified command using a generic query representation. 
 
bool primaryKeyExists(const std::string &, const std::string &)
It checks if a primary key exists in the dataset. 
 
boost::int64_t getLastGeneratedId()
It returns the last id generated by an insertion command. 
 
std::unique_ptr< te::da::Index > getIndex(const std::string &, const std::string &)
It gets the index with the given name from the dataset. 
 
A class that models the description of a dataset. 
 
void addSequence(te::da::Sequence *)
It creates a new sequence in the data source. 
 
#define TEGDALEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
std::unique_ptr< te::da::UniqueKey > getUniqueKey(const std::string &, const std::string &)
It gets the unique key in the dataset with the given name. 
 
void dropForeignKey(const std::string &, const std::string &)
It removes the foreign key constraint from the dataset schema. 
 
void addIndex(const std::string &, te::da::Index *, const std::map< std::string, std::string > &)
It adds an index to the dataset. 
 
std::unique_ptr< te::da::PrimaryKey > getPrimaryKey(const std::string &)
It retrieves the primary key of the dataset. 
 
SpatialRelation
Spatial relations between geometric objects. 
 
It describes a sequence (a number generator). 
 
bool checkConstraintExists(const std::string &, const std::string &)
It checks if a check-constraint with the given name exists in the data source. 
 
std::unique_ptr< te::da::BatchExecutor > getBatchExecutor()
It creates a batch command executor. 
 
A class that describes a check constraint. 
 
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
 
void addPrimaryKey(const std::string &, te::da::PrimaryKey *)
It adds a primary key constraint to the dataset schema. 
 
It models a property definition. 
 
bool uniqueKeyExists(const std::string &, const std::string &)
It checks if a unique key with the given name exists in the dataset. 
 
bool isInTransaction() const
It returns true if a transaction is in progress, otherwise, it returns false. 
 
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. 
 
std::vector< std::string > getForeignKeyNames(const std::string &)
It gets the foreign key names of the given dataset. 
 
void begin()
It starts a new transaction. 
 
void optimize(const std::map< std::string, std::string > &)
For some data access drivers, this method will perform some operations to optimize the data storage...
 
This class represents a set of unique ids created in the same context. i.e. from the same data set...
 
std::vector< std::string > getSequenceNames()
It gets the sequence names available in the data source. 
 
void add(const std::string &, te::da::DataSet *, const std::map< std::string, std::string > &, std::size_t, bool)
It adds data items to the dataset in the data source. 
 
void commit()
It commits the transaction. 
 
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...
 
void addCheckConstraint(const std::string &, te::da::CheckConstraint *)
It adds a check constraint to the dataset. 
 
void dropSequence(const std::string &)
It removes the sequence from the data source. 
 
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards. 
 
std::string escape(const std::string &)
It escapes a string for using in commands and queries. 
 
A Select models a query to be used when retrieving data from a DataSource. 
 
void dropPrimaryKey(const std::string &)
It removes the primary key constraint from the dataset schema. 
 
A dataset is the unit of information manipulated by the data access module of TerraLib. 
 
It describes a primary key (pk) constraint. 
 
void renameProperty(const std::string &, const std::string &, const std::string &)
It renames a property of the given dataset. 
 
bool foreignKeyExists(const std::string &, const std::string &)
It checks if a foreign key with the given name exists in the data source. 
 
std::size_t getNumberOfItems(const std::string &datasetName)
It retrieves the number of items of the given dataset. 
 
void dropUniqueKey(const std::string &, const std::string &)
It removes the unique key constraint from the dataset. 
 
void addForeignKey(const std::string &, te::da::ForeignKey *)
It adds a foreign key constraint to a dataset. 
 
std::unique_ptr< te::da::PreparedQuery > getPrepared(const std::string &)
It creates a prepared query object that may be used for query commands (select, insert, update and delete) that are used repeatedly. 
 
bool sequenceExists(const std::string &)
It checks if a sequence with the given name exists in the data source. 
 
void execute(const std::string &)
It executes the specifed command in the data source native language. 
 
std::unique_ptr< te::da::ForeignKey > getForeignKey(const std::string &, const std::string &)
It retrieves the foreign key from the given dataset. 
 
std::vector< std::string > getIndexNames(const std::string &)
It gets the index names of the given dataset. 
 
std::unique_ptr< te::da::CheckConstraint > getCheckConstraint(const std::string &, const std::string &)
It gets the check constraint of the dataset with the given name. 
 
void addProperty(const std::string &, te::dt::Property *)
It adds a new property to the dataset schema. 
 
std::unique_ptr< te::da::Sequence > getSequence(const std::string &)
It gets the sequence with the given name in the data source. 
 
void dropIndex(const std::string &, const std::string &)
It removes the index from the dataset schema. 
 
A Query is independent from the data source language/dialect. 
 
It describes an index associated to a DataSetType. 
 
std::vector< std::string > getCheckConstraintNames(const std::string &)
It gets the check constraint names of the given dataset. 
 
void cancel()
It requests that the data source stop the processing of the current command. 
 
void update(const std::string &, te::da::DataSet *, const std::vector< std::size_t > &, const te::da::ObjectIdSet *, const std::map< std::string, std::string > &, std::size_t)
It updates the contents of a dataset for the set of data items. 
 
Configuration flags for the GDAL Driver of TerraLib. 
 
void dropCheckConstraint(const std::string &, const std::string &)
It removes the check constraint from the dataset.