27 #include "../common/StringUtils.h" 28 #include "../core/translator/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())
92 if (viewNameUtf8 == viewName)
93 return it->second->id();
104 m_isInTransaction(false),
105 m_layerMap(m_db->layerMap()),
106 m_viewMap(m_db->viewMap()),
107 m_themeMap(m_db->themeMap())
122 m_db->beginTransaction();
128 m_db->commitTransaction();
134 m_db->rollbackTransaction();
152 if (
m_db->layerExist(nameLatin1))
154 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
158 if (it->second->name() == nameLatin1)
166 if(layer->hasGeometry(TeRASTER))
168 return std::unique_ptr<te::da::DataSet>(
new RasterDataSet(layer->raster()));
171 return std::unique_ptr<te::da::DataSet>(
new VectorDataSet(layer));
175 TeAttrTableVector tables;
176 m_db->getAttrTables(tables);
180 for(std::size_t i = 0; i < tables.size(); ++i)
182 if(tables[i].tableType() == TeAttrExternal && tables[i].name() == nameLatin1)
202 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
213 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
222 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
232 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support queries!"));
240 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support queries!"));
245 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support command execution!"));
250 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support command execution!"));
255 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support prepared queries!"));
260 throw Exception(
TE_TR(
"TerraLib 4.x driver doesn't support prepared batch executors!"));
269 throw Exception(
TE_TR(
"TerraLib 4.x driver is read-only!"));
274 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
279 throw Exception(
TE_TR(
"TerraLib 4.x driver is read-only!"));
284 throw Exception(
TE_TR(
"TerraLib 4.x driver is read-only!"));
289 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
291 std::vector<std::string> dataSets;
297 dataSets.push_back(layerNameUtf8);
302 TeAttrTableVector tableVector;
303 m_db->getAttrTables(tableVector);
305 for(std::size_t i = 0; i < tableVector.size(); ++i)
307 if (tableVector[i].tableType() == TeAttrExternal)
311 dataSets.push_back(tableNameUtf8);
329 if (
m_db->layerExist(nameLatin1))
331 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
335 if (it->second->name() == nameLatin1)
348 TeAttrTableVector tables;
349 m_db->getAttrTables(tables);
351 for(std::size_t i = 0; i < tables.size(); i++)
353 if (tables[i].tableType() == TeAttrExternal && nameLatin1 == tables[i].name())
365 if(layer->hasGeometry(TeRASTER))
377 TeAttrTableVector tables;
378 layer->getAttrTables(tables);
388 mainDst->setTitle(tableNameUtf8);
390 std::vector<std::string> pkey;
391 table.primaryKeys(pkey);
399 std::vector<te::dt::Property*> pkProps;
400 for(std::size_t i = 0; i < pkey.size(); ++i)
411 table.attrLink(attLink);
415 if (!attLinkNameUtf8.empty())
421 std::vector<te::dt::Property*> pkProps;
430 TeAttrTableVector tables;
431 layer->getAttrTables(tables);
433 if(tables.size() > 1)
435 for(std::size_t i = 1; i < tables.size(); ++i)
437 TeTable table = tables[i];
441 std::vector<te::dt::Property*> props = dst->getProperties();
443 for(std::size_t j = 0; j < props.size(); ++j)
453 TeRepresPointerVector vec = layer->vectRepres();
457 int srid = layer->projection()->epsgCode();
469 for (std::size_t i = 0; i < vec.size(); ++i)
473 geomRep = vec[i]->geomRep_;
477 if (vec[i]->geomRep_ < geomRep)
478 geomRep = vec[i]->geomRep_;
490 TeGeomRep geomRep = vec[0]->geomRep_;
497 mainDst->add(geomProp);
508 std::vector<te::dt::Property*> dtProperties = dt->getProperties();
510 boost::ptr_vector<te::dt::Property> properties;
512 for(std::size_t i = 0; i < dtProperties.size(); ++i)
513 properties.push_back(dtProperties[i]->clone());
521 throw Exception((boost::format(
TE_TR(
"The dataset \"%1%\" has no property with this name \"%2%\"!")) % datasetName % name).str());
525 return std::unique_ptr<te::dt::Property>(dt->getProperty(name)->clone());
532 assert(propertyPos < dt->size());
534 return std::unique_ptr<te::dt::Property>(dt->getProperty(propertyPos)->clone());
541 std::vector<std::string> pNames;
543 std::size_t numProperties = dt->size();
545 for(std::size_t i = 0; i < numProperties; ++i)
546 pNames.push_back(dt->getProperty(i)->getName());
564 if(std::find(pNames.begin(), pNames.end(), name) != pNames.end())
572 std::string name = p->
getName();
574 throw Exception((boost::format(
TE_TR(
"The dataset already \"%1%\" has a property with this name \"%2%\"!")) % datasetName % name).str());
578 TeAttributeRep newProperty;
580 newProperty.name_ = propertyNameLatin1;
590 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
598 if (layerNameUtf8 == datasetName)
606 TeAttrTableVector tables;
607 layer->getAttrTables(tables);
610 m_db->addColumn(tableNameUtf8, newProperty);
622 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
629 return std::unique_ptr<te::da::PrimaryKey>(
static_cast<te::da::PrimaryKey*
>(dt->getPrimaryKey()->clone()));
636 if(dt->getPrimaryKey()->getName() == name)
644 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
649 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
654 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
659 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
664 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
669 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
674 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
679 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
684 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
689 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
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!"));
729 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
734 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
739 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
743 const std::map<std::string, std::string>&)
745 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
750 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
755 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
760 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
765 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
770 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
775 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
781 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
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 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
804 for(std::size_t i = 0; i < names.size(); ++i)
813 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
818 const std::map<std::string, std::string>&)
820 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
825 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
830 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
835 const std::map<std::string, std::string>&,
839 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
844 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
849 const std::vector<std::size_t>&,
851 const std::map<std::string, std::string>&,
854 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
859 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
864 std::vector<std::string> layers;
866 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
870 if (!it->second->hasGeometry(TeRASTER) && !it->second->hasGeometry(TeRASTERFILE))
874 layers.push_back(strConverted);
885 std::vector<std::string> tablesVec;
887 TeAttrTableVector tables;
888 m_db->getAttrTables(tables, TeAttrExternal);
890 for (std::size_t i = 0; i < tables.size(); i++)
894 tablesVec.push_back(strConverted);
902 std::vector<std::string>
rasters;
904 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
908 if(it->second->hasGeometry(TeRASTER))
912 rasters.push_back(strConverted);
922 std::vector<std::pair<std::string, std::string> >
rasters;
924 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
928 if (it->second->hasGeometry(TeRASTERFILE))
930 std::pair<std::string, std::string> pair;
933 rasters.push_back(pair);
943 std::vector<::terralib4::ThemeInfo> themes;
945 TeViewMap& vMap =
m_db->viewMap();
946 TeThemeMap& tMap =
m_db->themeMap();
948 std::map<int, TeView*>::iterator it = vMap.begin();
950 while(it != vMap.end())
952 TeView* view = it->second;
954 std::map<int, TeAbstractTheme*>::iterator itT = tMap.begin();
956 while(itT != tMap.end())
958 TeAbstractTheme* abTheme = itT->second;
960 if(abTheme->type() == TeTHEME)
962 TeTheme* theme =
dynamic_cast<TeTheme*
>(abTheme);
964 if(theme->view() == view->id())
971 themes.push_back(themeInfo);
984 std::map<int, TeAbstractTheme*>::iterator it =
m_themeMap.begin();
990 TeAbstractTheme* abTheme = it->second;
992 if(abTheme->type() == TeTHEME)
994 TeTheme* tl4Theme =
dynamic_cast<TeTheme*
>(abTheme);
998 if(themeNameUtf8 == theme.m_layerName)
1013 std::map<int, TeLayer*>::iterator it =
m_layerMap.begin();
1019 if (nameUtf8 == layerName)
1021 int srid = it->second->projection()->epsgCode();
TeAttrDataType Convert2T4GeomType(te::gm::GeomType type)
std::vector< std::string > getTL4Rasters()
std::unique_ptr< te::da::DataSetType > getDataSetType(const std::string &name)
It gets information about the given dataset.
void push_back(Curve *ring)
It adds the curve to the curve polygon.
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.
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
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.
std::vector< std::pair< std::string, std::string > > getTL4RasterFiles()
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.
TETERRALIB4EXPORT std::string Convert2Utf8(const std::string &str)
bool primaryKeyExists(const std::string &datasetName, const std::string &name)
It checks if a primary key exists in the dataset.
std::map< int, TeLayer * > & m_layerMap
int getViewId(const std::string &viewName, TeViewMap &viewMap)
std::unique_ptr< te::da::PrimaryKey > getPrimaryKey(const std::string &datasetName)
It retrieves the primary key of the dataset.
std::vector< std::string > getDataSetNames()
It It gets the dataset names available in the data source.
std::map< int, TeView * > & m_viewMap
A class that models the description of a dataset.
std::unique_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.
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.
GeomType getGeomTypeId() const _NOEXCEPT_OP(true)
It returns the geometry subclass type identifier.
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.
std::unique_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.
bool uniqueKeyExists(const std::string &datasetName, const std::string &name)
It checks if a unique key with the given name exists in the dataset.
void dropIndex(const std::string &datasetName, const std::string &idxName)
It removes the index from the dataset schema.
std::unique_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.
SpatialRelation
Spatial relations between geometric objects.
std::unique_ptr< te::da::Sequence > getSequence(const std::string &name)
It gets the sequence with the given name in the data source.
te::gm::GeomType GetCollection(TeGeomRep rep)
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.
static te::dt::Date ds(2010, 01, 01)
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)
virtual Property * clone() const =0
It returns a clone of the object.
void cancel()
It requests that the data source stop the processing of the current command.
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::unique_ptr< te::dt::Property > Convert2T5(const TeAttributeRep &attRep)
It creates a valid TerraLib 5 property given a valid TerraLib 4.x attribute representation.
std::vector< std::string > getPropertyNames(const std::string &datasetName)
It gets the property names of the given dataset.
The basic information about a Terralib 4.x Theme.
void rollBack()
It aborts the transaction. Any changes will be rolled-back.
std::unique_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...
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.
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.
std::unique_ptr< te::da::Index > getIndex(const std::string &datasetName, const std::string &name)
It gets the index with the given name from the dataset.
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...
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.
Implements the DataSource class for the TerraLib 4.x Data Access Driver.
bool sequenceExists(const std::string &name)
It checks if a sequence with the given name exists in the data source.
TeTheme * getTL4Theme(const ::terralib4::ThemeInfo &theme)
static te::dt::TimeDuration dt(20, 30, 50, 11)
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.
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.
std::unique_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 > 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.
void add(const std::string &datasetName, te::da::DataSet *d, const std::map< std::string, std::string > &options, std::size_t limit=0, bool enableProgress=true)
It adds data items to the dataset in the data source.
Utility functions for the data access module.
std::unique_ptr< te::da::BatchExecutor > getBatchExecutor()
It creates a batch command executor.
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.
TETERRALIB4EXPORT std::string Convert2Latin1(const std::string &str)
int getType() const
It returns the property data type.
A dataset is the unit of information manipulated by the data access module of TerraLib.
An static class with global definitions.
std::unique_ptr< te::dt::Property > getProperty(const std::string &datasetName, const std::string &name)
It retrieves the property with the given name from the dataset.
void addSequence(te::da::Sequence *sequence)
It creates a new sequence in the data source.
int getLayerSRID(const std::string &layerName)
Implementation of a dataset for the TerraLib 4 driver.
DataSourceTransactor implementation for TerraLib 4.x API.
It describes a primary key (pk) constraint.
std::unique_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 dropCheckConstraint(const std::string &datasetName, const std::string &name)
It removes the check constraint 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.
std::map< int, TeAbstractTheme * > & m_themeMap
void begin()
It starts a new transaction.
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 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.
std::unique_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.
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.