27 #include "../common/StringUtils.h"
28 #include "../common/Translator.h"
29 #include "../dataaccess/dataset/CheckConstraint.h"
30 #include "../dataaccess/dataset/DataSet.h"
31 #include "../dataaccess/dataset/ForeignKey.h"
32 #include "../dataaccess/dataset/Index.h"
33 #include "../dataaccess/dataset/ObjectIdSet.h"
34 #include "../dataaccess/dataset/PrimaryKey.h"
35 #include "../dataaccess/dataset/Sequence.h"
36 #include "../dataaccess/dataset/UniqueKey.h"
37 #include "../dataaccess/datasource/DataSourceCatalog.h"
38 #include "../dataaccess/datasource/ScopedTransaction.h"
39 #include "../dataaccess/query/Select.h"
40 #include "../dataaccess/query/SQLDialect.h"
41 #include "../dataaccess/utils/Utils.h"
42 #include "../datatype/Array.h"
43 #include "../datatype/Date.h"
44 #include "../datatype/DateTimeProperty.h"
45 #include "../datatype/Property.h"
46 #include "../datatype/SimpleData.h"
47 #include "../datatype/StringProperty.h"
48 #include "../geometry/Envelope.h"
49 #include "../geometry/GeometryProperty.h"
50 #include "../geometry/Utils.h"
51 #include "../geometry/Geometry.h"
52 #include "../memory/DataSet.h"
53 #include "../raster/RasterProperty.h"
65 #include <terralib4/kernel/TeDatabase.h>
66 #include <terralib4/kernel/TeLayer.h>
67 #include <terralib4/kernel/TeTable.h>
68 #include <terralib4/kernel/TeTheme.h>
69 #include <terralib4/kernel/TeRasterTransform.h>
70 #include <terralib4/kernel/TeVisual.h>
80 #include <boost/format.hpp>
81 #include <boost/lexical_cast.hpp>
84 int getViewId(
const std::string& viewName, TeViewMap& viewMap)
86 std::map<int, TeView*>::iterator it = viewMap.begin();
88 while(it != viewMap.end())
90 if(it->second->name() == viewName)
91 return it->second->id();
102 m_isInTransaction(false),
103 m_layerMap(m_db->layerMap()),
104 m_viewMap(m_db->viewMap()),
105 m_themeMap(m_db->themeMap())
120 m_db->beginTransaction();
121 m_isInTransaction =
true;
126 m_db->commitTransaction();
127 m_isInTransaction =
false;
132 m_db->rollbackTransaction();
133 m_isInTransaction =
false;
138 return m_isInTransaction;
148 if(m_db->layerExist(name))
150 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
152 while(it != m_layerMap.end())
154 if(it->second->name() == name)
162 if(layer->hasGeometry(TeRASTER))
164 return std::auto_ptr<te::da::DataSet>(
new RasterDataSet(layer->raster()));
167 return std::auto_ptr<te::da::DataSet>(
new VectorDataSet(layer));
171 TeAttrTableVector tables;
172 m_db->getAttrTables(tables);
176 for(std::size_t i = 0; i < tables.size(); ++i)
178 if(tables[i].tableType() == TeAttrExternal && tables[i].name() == name)
186 return std::auto_ptr<te::da::DataSet>(
new TableDataSet(m_db, table));
191 const std::string& propertyName,
198 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
202 const std::string& propertyName,
209 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
213 const ObjectIdSet* oids,
218 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
228 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support queries!"));
236 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support queries!"));
241 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support command execution!"));
246 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support command execution!"));
251 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support prepared queries!"));
256 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support prepared batch executors!"));
265 throw Exception(
TE_TR(
"TerraLib 4.x driver is read-only!"));
270 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
275 throw Exception(
TE_TR(
"TerraLib 4.x driver is read-only!"));
280 throw Exception(
TE_TR(
"TerraLib 4.x driver is read-only!"));
285 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
287 std::vector<std::string> dataSets;
289 while(it != m_layerMap.end())
291 dataSets.push_back(it->second->name());
296 TeAttrTableVector tableVector;
297 m_db->getAttrTables(tableVector);
299 for(std::size_t i = 0; i < tableVector.size(); ++i)
301 if(tableVector[i].tableType() == TeAttrExternal)
302 dataSets.push_back(tableVector[i].name());
310 return getDataSetNames().size();
317 if(m_db->layerExist(name))
319 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
321 while(it != m_layerMap.end())
323 if(it->second->name() == name)
336 TeAttrTableVector tables;
337 m_db->getAttrTables(tables);
339 for(std::size_t i = 0; i < tables.size(); i++)
341 if(tables[i].tableType() == TeAttrExternal && name == tables[i].name())
353 if(layer->hasGeometry(TeRASTER))
363 TeAttrTableVector tables;
364 layer->getAttrTables(tables);
370 mainDst->setTitle(table.name());
372 std::vector<std::string> pkey;
373 table.primaryKeys(pkey);
381 std::vector<te::dt::Property*> pkProps;
382 for(std::size_t i = 0; i < pkey.size(); ++i)
385 pkProps.push_back(p);
393 table.attrLink(attLink);
395 std::string attLinkName = attLink.rep_.name_;
397 if(!attLinkName.empty())
403 std::vector<te::dt::Property*> pkProps;
404 pkProps.push_back(p);
412 TeAttrTableVector tables;
413 layer->getAttrTables(tables);
415 if(tables.size() > 1)
417 for(std::size_t i = 1; i < tables.size(); ++i)
419 TeTable table = tables[i];
423 std::vector<te::dt::Property*> props = dst->getProperties();
425 for(std::size_t j = 0; j < props.size(); ++j)
435 TeRepresPointerVector vec = layer->vectRepres();
439 TeGeomRep geomRep = vec[0]->geomRep_;
441 int srid = layer->projection()->epsgCode();
448 mainDst->add(geomProp);
457 std::auto_ptr<te::da::DataSetType> dt = getDataSetType(datasetName);
459 std::vector<te::dt::Property*> dtProperties = dt->getProperties();
461 boost::ptr_vector<te::dt::Property> properties;
463 for(std::size_t i = 0; i < dtProperties.size(); ++i)
464 properties.push_back(dtProperties[i]->clone());
471 if(!propertyExists(datasetName, name))
472 throw Exception((boost::format(
TE_TR(
"The dataset \"%1%\" has no property with this name \"%2%\"!")) % datasetName % name).str());
474 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
476 return std::auto_ptr<te::dt::Property>(dt->getProperty(name)->clone());
481 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
483 assert(propertyPos < dt->size());
485 return std::auto_ptr<te::dt::Property>(dt->getProperty(propertyPos)->clone());
490 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
492 std::vector<std::string> pNames;
494 std::size_t numProperties = dt->size();
496 for(std::size_t i = 0; i < numProperties; ++i)
497 pNames.push_back(dt->getProperty(i)->getName());
504 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
511 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
513 std::vector<std::string> pNames = getPropertyNames(datasetName);
515 if(std::find(pNames.begin(), pNames.end(), name) != pNames.end())
523 std::string name = p->
getName();
524 if(propertyExists(datasetName, name))
525 throw Exception((boost::format(
TE_TR(
"The dataset already \"%1%\" has a property with this name \"%2%\"!")) % datasetName % name).str());
529 TeAttributeRep newProperty;
531 newProperty.name_ = name;
541 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
545 while(it != m_layerMap.end())
547 if(it->second->name() == datasetName)
555 TeAttrTableVector tables;
556 layer->getAttrTables(tables);
557 std::string tableName = tables[0].name();
559 m_db->addColumn(tableName, newProperty);
568 const std::string& propertyName,
569 const std::string& newPropertyName)
571 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
576 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
578 return std::auto_ptr<te::da::PrimaryKey>(
static_cast<te::da::PrimaryKey*
>(dt->getPrimaryKey()->clone()));
583 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
585 if(dt->getPrimaryKey()->getName() == name)
593 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
598 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
603 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
608 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
613 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
618 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
623 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
628 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
633 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
638 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
643 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
648 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
653 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
658 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
663 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
668 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
673 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
678 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
683 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
688 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
692 const std::map<std::string, std::string>& options)
694 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
699 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
704 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
709 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
714 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
719 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
724 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
730 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
736 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
741 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
746 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
751 std::vector<std::string> names = getDataSetNames();
753 for(std::size_t i = 0; i < names.size(); ++i)
762 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
766 const std::string& cloneName,
767 const std::map<std::string, std::string>& options)
769 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
774 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
779 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
784 const std::map<std::string, std::string>& options,
787 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
792 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
797 const std::vector<std::size_t>& properties,
799 const std::map<std::string, std::string>& options,
802 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
807 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
812 std::vector<std::string> layers;
814 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
816 while(it != m_layerMap.end())
818 if(!it->second->hasGeometry(TeRASTER))
819 layers.push_back(it->second->name());
829 std::vector<std::string> tablesVec;
831 TeAttrTableVector tables;
832 m_db->getAttrTables(tables, TeAttrExternal);
834 for(std::size_t i = 0; i < tables.size(); i++)
835 tablesVec.push_back(tables[i].name());
842 std::vector<std::string> rasters;
844 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
846 while(it != m_layerMap.end())
848 if(it->second->hasGeometry(TeRASTER))
850 rasters.push_back(it->second->name());
860 std::vector<::terralib4::ThemeInfo> themes;
862 TeViewMap& vMap = m_db->viewMap();
863 TeThemeMap& tMap = m_db->themeMap();
865 std::map<int, TeView*>::iterator it = vMap.begin();
867 while(it != vMap.end())
869 TeView* view = it->second;
871 std::map<int, TeAbstractTheme*>::iterator itT = tMap.begin();
873 while(itT != tMap.end())
875 TeAbstractTheme* abTheme = itT->second;
877 if(abTheme->type() == TeTHEME)
879 TeTheme* theme =
dynamic_cast<TeTheme*
>(abTheme);
881 if(theme->view() == view->id())
884 themeInfo.
m_name = theme->name();
888 themes.push_back(themeInfo);
901 std::map<int, TeAbstractTheme*>::iterator it = m_themeMap.begin();
903 while(it != m_themeMap.end())
905 if(it->second->view() ==
getViewId(theme.m_viewName, m_viewMap))
907 TeAbstractTheme* abTheme = it->second;
909 if(abTheme->type() == TeTHEME)
911 TeTheme* tl4Theme =
dynamic_cast<TeTheme*
>(abTheme);
913 if(tl4Theme->layer()->name() == theme.m_layerName)
928 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
930 while(it != m_layerMap.end())
932 if(it->second->name() == layerName)
934 int srid = it->second->projection()->epsgCode();
TeAttrDataType Convert2T4GeomType(te::gm::GeomType type)
std::auto_ptr< te::da::ForeignKey > getForeignKey(const std::string &datasetName, const std::string &name)
It retrieves the foreign key from the given dataset.
std::vector< std::string > getTL4Rasters()
bool isInTransaction() const
It returns true if a transaction is in progress, otherwise, it returns false.
bool indexExists(const std::string &datasetName, const std::string &name)
It checks if an index with the given name exists in the dataset.
Utility functions for the data access module.
void addProperty(const std::string &datasetName, te::dt::Property *p)
It adds a new property to the dataset schema.
boost::int64_t getLastGeneratedId()
It returns the last id generated by an insertion command.
CharEncoding
Supported charsets (character encoding).
void cloneDataSet(const std::string &name, const std::string &cloneName, const std::map< std::string, std::string > &options)
It clones the dataset in the data source.
DataSourceTransactor implementation for TerraLib 4.x API.
An static class with global definitions.
bool primaryKeyExists(const std::string &datasetName, const std::string &name)
It checks if a primary key exists in the dataset.
std::vector< std::string > getDataSetNames()
It It gets the dataset names available in the data source.
A class that models the description of a dataset.
int getViewId(const std::string &viewName, TeViewMap &viewMap)
bool propertyExists(const std::string &datasetName, const std::string &name)
It checks if a property with the given name exists in the dataset.
std::vector< std::string > getForeignKeyNames(const std::string &datasetName)
It gets the foreign key names of the given dataset.
void createDataSet(te::da::DataSetType *dt, const std::map< std::string, std::string > &options)
It creates the dataset schema definition in the target data source.
virtual Property * clone() const =0
It returns a clone of the object.
bool uniqueKeyExists(const std::string &datasetName, const std::string &name)
It checks if a unique key with the given name exists in the dataset.
Implements the DataSource class for the TerraLib 4.x Data Access Driver.
void dropIndex(const std::string &datasetName, const std::string &idxName)
It removes the index from the dataset schema.
SpatialRelation
Spatial relations between geometric objects.
It describes a sequence (a number generator).
void renameProperty(const std::string &datasetName, const std::string &propertyName, const std::string &newPropertyName)
It renames a property of the given dataset.
bool dataSetExists(const std::string &name)
It checks if a dataset with the given name exists in the data source.
bool hasDataSets()
It checks if the data source has any dataset.
void optimize(const std::map< std::string, std::string > &opInfo)
For some data access drivers, this method will perform some operations to optimize the data storage...
A class that describes a check constraint.
std::string escape(const std::string &value)
It escapes a string for using in commands and queries.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
#define TE_TR(message)
It marks a string in order to get translated.
std::vector< std::string > getTL4Tables()
Transactor(DataSource *ds, TeDatabase *db)
void cancel()
It requests that the data source stop the processing of the current command.
std::auto_ptr< te::da::BatchExecutor > getBatchExecutor()
It creates a batch command executor.
It models a property definition.
boost::ptr_vector< te::dt::Property > getProperties(const std::string &datasetName)
It retrieves the properties of the dataset.
void dropForeignKey(const std::string &datasetName, const std::string &fkName)
It removes the foreign key constraint from the dataset schema.
std::vector< std::string > getPropertyNames(const std::string &datasetName)
It gets the property names of the given dataset.
std::auto_ptr< te::dt::Property > Convert2T5(const TeAttributeRep &attRep)
It creates a valid TerraLib 5 property given a valid TerraLib 4.x attribute representation.
The basic information about a Terralib 4.x Theme.
void rollBack()
It aborts the transaction. Any changes will be rolled-back.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
void remove(const std::string &datasetName, const te::da::ObjectIdSet *oids=0)
It removes all the informed items from the dataset.
void update(const std::string &datasetName, te::da::DataSet *dataset, const std::vector< std::size_t > &properties, const te::da::ObjectIdSet *oids, const std::map< std::string, std::string > &options, std::size_t limit=0)
It updates the contents of a dataset for the set of data items.
std::auto_ptr< te::da::PrimaryKey > getPrimaryKey(const std::string &datasetName)
It retrieves the primary key of the dataset.
void renameDataSet(const std::string &name, const std::string &newName)
It renames a dataset.
void setName(const std::string &name)
It sets the property name.
std::vector< std::string > getCheckConstraintNames(const std::string &datasetName)
It gets the check constraint names of the given dataset.
te::gm::GeomType Convert2T5GeomType(TeAttrDataType type)
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...
std::auto_ptr< te::da::Sequence > getSequence(const std::string &name)
It gets the sequence with the given name in the data source.
bool foreignKeyExists(const std::string &datasetName, const std::string &name)
It checks if a foreign key with the given name exists in the data source.
bool sequenceExists(const std::string &name)
It checks if a sequence with the given name exists in the data source.
Implementation of a dataset for the TerraLib 4 driver.
void addPrimaryKey(const std::string &datasetName, te::da::PrimaryKey *pk)
It adds a primary key constraint to the dataset schema.
std::size_t getNumberOfProperties(const std::string &datasetName)
It gets the number of properties of the given dataset.
std::auto_ptr< te::da::CheckConstraint > getCheckConstraint(const std::string &datasetName, const std::string &name)
It gets the check constraint of the dataset with the given name.
void setProperties(const std::vector< te::dt::Property * > &properties)
It sets the properties that form the primary key.
void dropPrimaryKey(const std::string &datasetName)
It removes the primary key constraint from the dataset schema.
std::vector< std::string > getIndexNames(const std::string &datasetName)
It gets the index names of the given dataset.
void addIndex(const std::string &datasetName, te::da::Index *idx, const std::map< std::string, std::string > &options)
It adds an index to the dataset.
void execute(const te::da::Query &command)
It executes the specified command using a generic query representation.
It models a foreign key constraint for a DataSetType.
TeTheme * getTL4Theme(const ::terralib4::ThemeInfo theme)
std::vector< std::string > getUniqueKeyNames(const std::string &datasetName)
It gets the unique key names of the given dataset.
It describes a unique key (uk) constraint.
std::size_t getNumberOfItems(const std::string &datasetName)
It retrieves the number of items of the given dataset.
bool isPropertyNameValid(const std::string &propertyName)
It checks if the given property name is valid.
GeomType getGeomTypeId() const
It returns the geometry subclass type identifier.
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.
void addForeignKey(const std::string &datasetName, te::da::ForeignKey *fk)
It adds a foreign key constraint to a dataset.
std::auto_ptr< te::da::UniqueKey > getUniqueKey(const std::string &datasetName, const std::string &name)
It gets the unique key in the dataset with the given name.
te::common::CharEncoding getEncoding()
It return the DataSource current encoding.
int getType() const
It returns the property data type.
A dataset is the unit of information manipulated by the data access module of TerraLib.
std::auto_ptr< te::da::DataSetType > getDataSetType(const std::string &name)
It gets information about the given dataset.
void addSequence(te::da::Sequence *sequence)
It creates a new sequence in the data source.
std::auto_ptr< te::dt::Property > getProperty(const std::string &datasetName, const std::string &name)
It retrieves the property with the given name from the dataset.
int getLayerSRID(const std::string &layerName)
Implementation of a dataset for the TerraLib 4 driver.
It describes a primary key (pk) constraint.
void dropCheckConstraint(const std::string &datasetName, const std::string &name)
It removes the check constraint from the dataset.
std::auto_ptr< te::da::DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)
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.
std::auto_ptr< te::da::Index > getIndex(const std::string &datasetName, const std::string &name)
It gets the index with the given name from the dataset.
void dropUniqueKey(const std::string &datasetName, const std::string &name)
It removes the unique key constraint from the dataset.
void addCheckConstraint(const std::string &datasetName, te::da::CheckConstraint *cc)
It adds a check constraint to the dataset.
void commit()
It commits the transaction.
std::size_t getNumberOfDataSets()
It retrieves the number of data sets available in the data source.
void begin()
It starts a new transaction.
std::auto_ptr< te::da::DataSet > query(const te::da::Select &q, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)
It executes a query that may return some data using a generic query. A dataset can be connected or di...
std::auto_ptr< te::da::PreparedQuery > getPrepared(const std::string &qName=std::string(""))
It creates a prepared query object that may be used for query commands (select, insert, update and delete) that are used repeatedly.
TeAttrDataType Convert2T4(int type)
It converts a Terralib 5 data type to Terralib 4.x data type.
std::vector< std::string > getTL4Layers()
bool isDataSetNameValid(const std::string &datasetName)
It returns true if the given string is a valid dataset name.
std::vector< std::string > getSequenceNames()
It gets the sequence names available in the data source.
void add(const std::string &datasetName, te::da::DataSet *d, const std::map< std::string, std::string > &options, std::size_t limit=0)
It adds data items to the dataset in the data source.
std::auto_ptr< te::gm::Envelope > getExtent(const std::string &datasetName, const std::string &propertyName)
It retrieves the bounding rectangle of the spatial property for the given dataset.
void dropDataSet(const std::string &name)
It removes the dataset schema from the data source.
void dropSequence(const std::string &name)
It removes the sequence from the data source.
A Query is independent from the data source language/dialect.
It describes an index associated to a DataSetType.
te::da::DataSource * getDataSource() const
It returns the parent data source of the transactor.
void addUniqueKey(const std::string &datasetName, te::da::UniqueKey *uk)
It adds a unique key constraint to the dataset.
std::vector<::terralib4::ThemeInfo > getTL4Themes()
void dropProperty(const std::string &datasetName, const std::string &name)
It removes a property from the given dataset.
bool checkConstraintExists(const std::string &datasetName, const std::string &name)
It checks if a check-constraint with the given name exists in the data source.
const std::string & getName() const
It returns the property name.