26 #ifndef __TERRALIB_TERRALIB4_INTERNAL_DATASOURCETRANSACTOR_H 
   27 #define __TERRALIB_TERRALIB4_INTERNAL_DATASOURCETRANSACTOR_H 
   30 #include "../dataaccess/datasource/DataSourceTransactor.h" 
   40 class TeAbstractTheme;
 
   45   namespace dt { 
class Property; }
 
   46   namespace gm { 
class Envelope; 
class Geometry; }
 
   75       bool isInTransaction() 
const;
 
   77       std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name, 
 
   79                                                 bool connected = 
false,
 
   82       std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name,
 
   83                                                 const std::string& propertyName,
 
   87                                                 bool connected = 
false,
 
   90       std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name,
 
   91                                                 const std::string& propertyName,
 
   95                                                 bool connected = 
false,
 
   98       std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name,
 
   99                                                 const ObjectIdSet* oids, 
 
  101                                                 bool connected = 
false,
 
  106                                            bool connected = 
false,
 
  109       std::auto_ptr<te::da::DataSet> query(
const std::string& query,
 
  111                                            bool connected = 
false,
 
  116       void execute(
const std::string& command);
 
  118       std::auto_ptr<te::da::PreparedQuery> getPrepared(
const std::string& qName = std::string(
""));
 
  120       std::auto_ptr<te::da::BatchExecutor> getBatchExecutor();
 
  124       boost::int64_t getLastGeneratedId();
 
  126       std::string escape(
const std::string& value);
 
  128       bool isDataSetNameValid(
const std::string& datasetName);
 
  130       bool isPropertyNameValid(
const std::string& propertyName);
 
  132       std::vector<std::string> getDataSetNames();
 
  134       std::size_t getNumberOfDataSets();
 
  136       std::auto_ptr<te::da::DataSetType> getDataSetType(
const std::string& name);
 
  138       boost::ptr_vector<te::dt::Property> getProperties(
const std::string& datasetName);
 
  140       std::auto_ptr<te::dt::Property> getProperty(
const std::string& datasetName, 
const std::string& name);
 
  142       std::auto_ptr<te::dt::Property> getProperty(
const std::string& datasetName, std::size_t propertyPos);
 
  144       std::vector<std::string> getPropertyNames(
const std::string& datasetName);
 
  146       std::size_t getNumberOfProperties(
const std::string& datasetName);
 
  148       bool propertyExists(
const std::string& datasetName, 
const std::string& name);
 
  152       void dropProperty(
const std::string& datasetName, 
const std::string& name);
 
  154       void renameProperty(
const std::string& datasetName,
 
  155                           const std::string& propertyName,
 
  156                           const std::string& newPropertyName);
 
  158       std::auto_ptr<te::da::PrimaryKey> getPrimaryKey(
const std::string& datasetName);
 
  160       bool primaryKeyExists(
const std::string& datasetName, 
const std::string& name);
 
  164       void dropPrimaryKey(
const std::string& datasetName);
 
  166       std::auto_ptr<te::da::ForeignKey> getForeignKey(
const std::string& datasetName, 
const std::string& name);
 
  168       std::vector<std::string> getForeignKeyNames(
const std::string& datasetName);
 
  170       bool foreignKeyExists(
const std::string& datasetName, 
const std::string& name);
 
  174       void dropForeignKey(
const std::string& datasetName, 
const std::string& fkName);
 
  176       std::auto_ptr<te::da::UniqueKey> getUniqueKey(
const std::string& datasetName, 
const std::string& name);
 
  178       std::vector<std::string> getUniqueKeyNames(
const std::string& datasetName);
 
  180       bool uniqueKeyExists(
const std::string& datasetName, 
const std::string& name);
 
  184       void dropUniqueKey(
const std::string& datasetName, 
const std::string& name);
 
  186       std::auto_ptr<te::da::CheckConstraint> getCheckConstraint(
const std::string& datasetName, 
const std::string& name);
 
  188       std::vector<std::string> getCheckConstraintNames(
const std::string& datasetName);
 
  190       bool checkConstraintExists(
const std::string& datasetName, 
const std::string& name);
 
  194       void dropCheckConstraint(
const std::string& datasetName, 
const std::string& name);
 
  196       std::auto_ptr<te::da::Index> getIndex(
const std::string& datasetName, 
const std::string& name);
 
  198       std::vector<std::string> getIndexNames(
const std::string& datasetName);
 
  200       bool indexExists(
const std::string& datasetName, 
const std::string& name);
 
  202       void addIndex(
const std::string& datasetName, 
te::da::Index* idx,
 
  203                     const std::map<std::string, std::string>& options); 
 
  205       void dropIndex(
const std::string& datasetName, 
const std::string& idxName);
 
  207       std::auto_ptr<te::da::Sequence> getSequence(
const std::string& name);
 
  209       std::vector<std::string> getSequenceNames();
 
  211       bool sequenceExists(
const std::string& name);
 
  215       void dropSequence(
const std::string& name);
 
  217       std::auto_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
 
  218                                                 const std::string& propertyName);
 
  220       std::auto_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
 
  221                                                 std::size_t propertyPos);
 
  223       std::size_t getNumberOfItems(
const std::string& datasetName);
 
  227       bool dataSetExists(
const std::string& name);
 
  229       void createDataSet(
te::da::DataSetType* dt, 
const std::map<std::string, std::string>& options);
 
  231       void cloneDataSet(
const std::string& name,
 
  232                         const std::string& cloneName,
 
  233                         const std::map<std::string, std::string>& options);
 
  235       void dropDataSet(
const std::string& name);
 
  237       void renameDataSet(
const std::string& name, 
const std::string& newName);
 
  239       void add(
const std::string& datasetName,
 
  241                 const std::map<std::string, std::string>& options,
 
  242                 std::size_t limit = 0);
 
  246       void update(
const std::string& datasetName,
 
  248                   const std::vector<std::size_t>& properties,
 
  250                   const std::map<std::string, std::string>& options,
 
  251                   std::size_t limit = 0);
 
  253       void optimize(
const std::map<std::string, std::string>& opInfo);
 
  257       std::vector<std::string> getTL4Layers();
 
  259       std::vector<std::string> getTL4Tables();
 
  261       std::vector<std::string> getTL4Rasters();
 
  263       std::vector<std::pair<std::string, std::string> > getTL4RasterFiles();
 
  265       std::vector<::terralib4::ThemeInfo> getTL4Themes();
 
  267       TeTheme* getTL4Theme(const ::terralib4::ThemeInfo& theme);
 
  269       int getLayerSRID(
const std::string & layerName);
 
  285 #endif  // __TERRALIB_TERRALIB4_INTERNAL_DATASOURCETRANSACTOR_H 
CharEncoding
Supported charsets (character encoding). 
std::map< int, TeLayer * > & m_layerMap
std::map< int, TeView * > & m_viewMap
A class that models the description of a dataset. 
Implements the DataSource class for the TerraLib 4.x Data Access Driver. 
SpatialRelation
Spatial relations between geometric objects. 
It describes a sequence (a number generator). 
A class that describes a check constraint. 
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
Configuration flags for the TerraLib 4 driver. 
It models a property definition. 
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...
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. 
A dataset is the unit of information manipulated by the data access module of TerraLib. 
#define TETERRALIB4EXPORT
You can use this macro in order to export/import classes and functions from this module. 
It describes a primary key (pk) constraint. 
std::map< int, TeAbstractTheme * > & m_themeMap
A Query is independent from the data source language/dialect. 
It describes an index associated to a DataSetType.