26 #ifndef __TERRALIB_ADO_INTERNAL_DATASOURCETRANSACTOR_H
27 #define __TERRALIB_ADO_INTERNAL_DATASOURCETRANSACTOR_H
30 #include "../dataaccess/datasource/DataSourceTransactor.h"
43 namespace gm {
class Envelope;
class Geometry; }
78 bool isInTransaction()
const;
80 std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name,
82 bool connected =
false,
85 std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name,
86 const std::string& propertyName,
90 bool connected =
false,
93 std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name,
94 const std::string& propertyName,
98 bool connected =
false,
101 std::auto_ptr<te::da::DataSet> getDataSet(
const std::string& name,
102 const ObjectIdSet* oids,
104 bool connected =
false,
109 bool connected =
false,
112 std::auto_ptr<te::da::DataSet> query(
const std::string& query,
114 bool connected =
false,
119 void execute(
const std::string& command);
121 std::auto_ptr<te::da::PreparedQuery> getPrepared(
const std::string& qName = std::string(
""));
123 std::auto_ptr<te::da::BatchExecutor> getBatchExecutor();
127 boost::int64_t getLastGeneratedId();
129 std::string escape(
const std::string& value);
131 bool isDataSetNameValid(
const std::string& datasetName);
133 bool isPropertyNameValid(
const std::string& propertyName);
135 std::vector<std::string> getDataSetNames();
137 std::size_t getNumberOfDataSets();
139 std::auto_ptr<te::da::DataSetType> getDataSetType(
const std::string& name);
141 boost::ptr_vector<te::dt::Property> getProperties(
const std::string& datasetName);
143 std::auto_ptr<te::dt::Property> getProperty(
const std::string& datasetName,
const std::string& name);
145 std::auto_ptr<te::dt::Property> getProperty(
const std::string& datasetName, std::size_t propertyPos);
147 std::vector<std::string> getPropertyNames(
const std::string& datasetName);
149 std::size_t getNumberOfProperties(
const std::string& datasetName);
151 bool propertyExists(
const std::string& datasetName,
const std::string& name);
157 void dropProperty(
const std::string& datasetName,
const std::string& name);
160 void renameProperty(
const std::string& datasetName,
161 const std::string& propertyName,
162 const std::string& newPropertyName);
164 std::auto_ptr<te::da::PrimaryKey> getPrimaryKey(
const std::string& datasetName);
166 bool primaryKeyExists(
const std::string& datasetName,
const std::string& name);
170 void dropPrimaryKey(
const std::string& datasetName);
172 std::auto_ptr<te::da::ForeignKey> getForeignKey(
const std::string& datasetName,
const std::string& name);
174 std::vector<std::string> getForeignKeyNames(
const std::string& datasetName);
176 bool foreignKeyExists(
const std::string& datasetName,
const std::string& name);
180 void dropForeignKey(
const std::string& datasetName,
const std::string& fkName);
182 std::auto_ptr<te::da::UniqueKey> getUniqueKey(
const std::string& datasetName,
const std::string& name);
184 std::vector<std::string> getUniqueKeyNames(
const std::string& datasetName);
186 bool uniqueKeyExists(
const std::string& datasetName,
const std::string& name);
190 void dropUniqueKey(
const std::string& datasetName,
const std::string& name);
192 std::auto_ptr<te::da::CheckConstraint> getCheckConstraint(
const std::string& datasetName,
const std::string& name);
194 std::vector<std::string> getCheckConstraintNames(
const std::string& datasetName);
196 bool checkConstraintExists(
const std::string& datasetName,
const std::string& name);
200 void dropCheckConstraint(
const std::string& datasetName,
const std::string& name);
202 std::auto_ptr<te::da::Index> getIndex(
const std::string& datasetName,
const std::string& name);
204 std::vector<std::string> getIndexNames(
const std::string& datasetName);
206 bool indexExists(
const std::string& datasetName,
const std::string& name);
208 void addIndex(
const std::string& datasetName,
te::da::Index* idx,
209 const std::map<std::string, std::string>& options);
211 void dropIndex(
const std::string& datasetName,
const std::string& idxName);
213 std::auto_ptr<te::da::Sequence> getSequence(
const std::string& name);
215 std::vector<std::string> getSequenceNames();
217 bool sequenceExists(
const std::string& name);
221 void dropSequence(
const std::string& name);
223 std::auto_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
224 const std::string& propertyName);
226 std::auto_ptr<te::gm::Envelope> getExtent(
const std::string& datasetName,
227 std::size_t propertyPos);
229 std::size_t getNumberOfItems(
const std::string& datasetName);
233 bool dataSetExists(
const std::string& name);
235 void createDataSet(
te::da::DataSetType* dt,
const std::map<std::string, std::string>& options);
237 void cloneDataSet(
const std::string& name,
238 const std::string& cloneName,
239 const std::map<std::string, std::string>& options);
241 void dropDataSet(
const std::string& name);
243 void renameDataSet(
const std::string& name,
const std::string& newName);
245 void add(
const std::string& datasetName,
247 const std::map<std::string, std::string>& options,
248 std::size_t limit = 0);
252 void update(
const std::string& datasetName,
254 const std::vector<std::size_t>& properties,
256 const std::map<std::string, std::string>& options,
257 std::size_t limit = 0);
259 void optimize(
const std::map<std::string, std::string>& opInfo);
318 void insertIntoGeometryColumns(
const std::string& datasetName,
337 #endif // __TERRALIB_ADO_INTERNAL_DATASOURCETRANSACTOR_H
The transactor class for the Microsoft Access driver.
It describes an index associated to a DataSetType.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
A Select models a query to be used when retrieving data from a DataSource.
It describes a primary key (pk) constraint.
It describes a sequence (a number generator).
SpatialRelation
Spatial relations between geometric objects.
It models a foreign key constraint for a DataSetType.
AccessPolicy
Supported data access policies (can be used as bitfield).
A Query is independent from the data source language/dialect.
Configuration flags for the TerraLib ADO Data Access driver.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Implementation of the data source class for the ADO driver.
It describes a unique key (uk) constraint.
TraverseType
A dataset can be traversed in two ways:
DataSource * m_ds
The ADO data source associated to this transactor.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
DataSource * getAdoDataSource() const
A class that models the description of a dataset.
It models a property definition.
Connection * m_conn
The connection used by this transactor.
bool m_isInTransaction
Tells if there is a transaction in progress.
#define TEADOEXPORT
You can use this macro in order to export/import classes and functions from this module.
A class that describes a check constraint.
An Envelope defines a 2D rectangular region.
A dataset is the unit of information manipulated by the data access module of TerraLib.
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
A class that implements a connection to a ADO database.