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));
198 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
209 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
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());
527 TeAttributeRep newProperty;
529 newProperty.name_ = name;
539 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
543 while(it != m_layerMap.end())
545 if(it->second->name() == datasetName)
553 TeAttrTableVector tables;
554 layer->getAttrTables(tables);
555 std::string tableName = tables[0].name();
557 m_db->addColumn(tableName, newProperty);
569 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
574 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
576 return std::auto_ptr<te::da::PrimaryKey>(
static_cast<te::da::PrimaryKey*
>(dt->getPrimaryKey()->clone()));
581 std::auto_ptr<te::da::DataSetType> dt(getDataSetType(datasetName));
583 if(dt->getPrimaryKey()->getName() == name)
591 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
596 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
601 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
606 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
611 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
616 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
621 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
626 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
631 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
636 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
641 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
646 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
651 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
656 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
661 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
666 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
671 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
676 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
681 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
686 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
690 const std::map<std::string, std::string>&)
692 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
697 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
702 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
707 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
712 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
717 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
722 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
728 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!"));
744 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
749 std::vector<std::string> names = getDataSetNames();
751 for(std::size_t i = 0; i < names.size(); ++i)
760 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
765 const std::map<std::string, std::string>&)
767 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
772 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
777 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
782 const std::map<std::string, std::string>&,
785 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
790 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
795 const std::vector<std::size_t>&,
797 const std::map<std::string, std::string>&,
800 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
805 throw Exception(
TE_TR(
"This method is not supported by TerraLib 4.x driver!"));
810 std::vector<std::string> layers;
812 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
814 while(it != m_layerMap.end())
816 if(!it->second->hasGeometry(TeRASTER))
817 layers.push_back(it->second->name());
827 std::vector<std::string> tablesVec;
829 TeAttrTableVector tables;
830 m_db->getAttrTables(tables, TeAttrExternal);
832 for(std::size_t i = 0; i < tables.size(); i++)
833 tablesVec.push_back(tables[i].name());
840 std::vector<std::string> rasters;
842 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
844 while(it != m_layerMap.end())
846 if(it->second->hasGeometry(TeRASTER))
848 rasters.push_back(it->second->name());
858 std::vector<::terralib4::ThemeInfo> themes;
860 TeViewMap& vMap = m_db->viewMap();
861 TeThemeMap& tMap = m_db->themeMap();
863 std::map<int, TeView*>::iterator it = vMap.begin();
865 while(it != vMap.end())
867 TeView* view = it->second;
869 std::map<int, TeAbstractTheme*>::iterator itT = tMap.begin();
871 while(itT != tMap.end())
873 TeAbstractTheme* abTheme = itT->second;
875 if(abTheme->type() == TeTHEME)
877 TeTheme* theme =
dynamic_cast<TeTheme*
>(abTheme);
879 if(theme->view() == view->id())
882 themeInfo.
m_name = theme->name();
886 themes.push_back(themeInfo);
899 std::map<int, TeAbstractTheme*>::iterator it = m_themeMap.begin();
901 while(it != m_themeMap.end())
903 if(it->second->view() ==
getViewId(theme.m_viewName, m_viewMap))
905 TeAbstractTheme* abTheme = it->second;
907 if(abTheme->type() == TeTHEME)
909 TeTheme* tl4Theme =
dynamic_cast<TeTheme*
>(abTheme);
911 if(tl4Theme->layer()->name() == theme.m_layerName)
926 std::map<int, TeLayer*>::iterator it = m_layerMap.begin();
928 while(it != m_layerMap.end())
930 if(it->second->name() == layerName)
932 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.
TeTheme * getTL4Theme(const ::terralib4::ThemeInfo &theme)
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.
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.