src/terralib/memory/Transactor.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/memory/Transactor.cpp
22 
23  \brief An implementation of the Transactor class for the Memory Data Access driver.
24 */
25 
26 // TerraLib
27 #include "../core/translator/Translator.h"
28 #include "../dataaccess/dataset/DataSetType.h"
29 #include "../geometry/Envelope.h"
30 #include "DataSet.h"
31 #include "DataSource.h"
32 #include "Transactor.h"
33 #include "Exception.h"
34 
35 
37  : m_ds(ds)
38 {
39 }
40 
42 
44 {
45  return m_ds;
46 }
47 
49 {
50 // Not supported by the Memory Driver!
51 }
52 
54 {
55 // Not supported by the Memory Driver!
56 }
57 
59 {
60 // Not supported by the Memory Driver!
61 }
62 
64 {
65  return false;
66 }
67 
68 std::unique_ptr<te::da::DataSet> te::mem::Transactor::getDataSet(const std::string& name,
69  te::common::TraverseType travType,
70  bool /*connected*/)
71 {
72  return m_ds->getDataSet(name, travType);
73 }
74 
75 std::unique_ptr<te::da::DataSet> te::mem::Transactor::getDataSet(
76  const std::string& /*name*/, const std::string& /*propertyName*/,
77  const te::gm::Envelope* /*e*/, te::gm::SpatialRelation /*r*/,
78  te::common::TraverseType /*travType*/, bool /*connected*/)
79 {
80  return std::unique_ptr<te::da::DataSet>(nullptr);
81 }
82 
83 std::unique_ptr<te::da::DataSet> te::mem::Transactor::getDataSet(
84  const std::string& /*name*/, const std::string& /*propertyName*/,
85  const te::gm::Geometry* /*g*/, te::gm::SpatialRelation /*r*/,
86  te::common::TraverseType /*travType*/, bool /*connected*/)
87 {
88  return std::unique_ptr<te::da::DataSet>(nullptr);
89 }
90 
91 std::unique_ptr<te::da::DataSet> te::mem::Transactor::query(
92  const te::da::Select& /*q*/, te::common::TraverseType /*travType*/,
93  bool /*connected*/)
94 {
95  return std::unique_ptr<te::da::DataSet>(nullptr);
96 }
97 
98 std::unique_ptr<te::da::DataSet> te::mem::Transactor::query(
99  const std::string& /*q*/, te::common::TraverseType /*travType*/,
100  bool /*connected*/)
101 {
102  return std::unique_ptr<te::da::DataSet>(nullptr);
103 }
104 
106 {
107 }
108 
109 void te::mem::Transactor::execute(const std::string& /*command*/)
110 {
111 }
112 
113 std::unique_ptr<te::da::PreparedQuery> te::mem::Transactor::getPrepared(
114  const std::string& /*qName*/)
115 {
116  return std::unique_ptr<te::da::PreparedQuery>();
117 }
118 
119 std::unique_ptr<te::da::BatchExecutor> te::mem::Transactor::getBatchExecutor()
120 {
121  return std::unique_ptr<te::da::BatchExecutor>();
122 }
123 
125 {
126 }
127 
129 {
130  return 0;
131 }
132 
133 std::string te::mem::Transactor::escape(const std::string& value)
134 {
135  return std::string(value);
136 }
137 
138 bool te::mem::Transactor::isDataSetNameValid(const std::string& /*datasetName*/)
139 {
140  return true;
141 }
142 
144  const std::string& /*propertyName*/)
145 {
146  return true;
147 }
148 
149 std::vector<std::string> te::mem::Transactor::getDataSetNames()
150 {
151  return m_ds->getDataSetNames();
152 }
153 
155 {
156  return m_ds->getNumberOfDataSets();
157 }
158 
159 std::unique_ptr<te::da::DataSetType> te::mem::Transactor::getDataSetType(const std::string& name)
160 {
161  return m_ds->getDataSetType(name);
162 }
163 
164 boost::ptr_vector<te::dt::Property> te::mem::Transactor::getProperties(const std::string& datasetName)
165 {
166  return m_ds->getProperties(datasetName);
167 }
168 
169 std::unique_ptr<te::dt::Property> te::mem::Transactor::getProperty(const std::string& datasetName, const std::string& name)
170 {
171  return m_ds->getProperty(datasetName, name);
172 }
173 
174 std::unique_ptr<te::dt::Property> te::mem::Transactor::getProperty(const std::string& datasetName, std::size_t propertyPos)
175 {
176  return m_ds->getProperty(datasetName, propertyPos);
177 }
178 
179 std::vector<std::string> te::mem::Transactor::getPropertyNames(const std::string& datasetName)
180 {
181  return m_ds->getPropertyNames(datasetName);
182 }
183 
184 std::size_t te::mem::Transactor::getNumberOfProperties(const std::string& datasetName)
185 {
186  return m_ds->getNumberOfProperties(datasetName);
187 }
188 
189 bool te::mem::Transactor::propertyExists(const std::string& datasetName, const std::string& name)
190 {
191  return m_ds->propertyExists(datasetName, name);
192 }
193 
194 void te::mem::Transactor::addProperty(const std::string& datasetName, te::dt::Property* p)
195 {
196  m_ds->addProperty(datasetName, p);
197 }
198 
199 void te::mem::Transactor::dropProperty(const std::string& datasetName, const std::string& name)
200 {
201  m_ds->dropProperty(datasetName, name);
202 }
203 
204 void te::mem::Transactor::renameProperty(const std::string& datasetName,
205  const std::string& propertyName,
206  const std::string& newPropertyName)
207 {
208  m_ds->renameProperty(datasetName, propertyName, newPropertyName);
209 }
210 
211 std::unique_ptr<te::da::PrimaryKey> te::mem::Transactor::getPrimaryKey(
212  const std::string& /*datasetName*/)
213 {
214  return std::unique_ptr<te::da::PrimaryKey>();
215 }
216 
217 bool te::mem::Transactor::primaryKeyExists(const std::string& /*datasetName*/, const std::string& /*name*/)
218 {
219  return false;
220 }
221 
222 void te::mem::Transactor::addPrimaryKey(const std::string& /*datasetName*/, te::da::PrimaryKey* /*pk*/)
223 {
224 }
225 
226 void te::mem::Transactor::dropPrimaryKey(const std::string& /*datasetName*/)
227 {
228 }
229 
230 std::unique_ptr<te::da::ForeignKey> te::mem::Transactor::getForeignKey(const std::string& /*datasetName*/, const std::string& /*name*/)
231 {
232  return std::unique_ptr<te::da::ForeignKey>();
233 }
234 
235 std::vector<std::string> te::mem::Transactor::getForeignKeyNames(const std::string& /*datasetName*/)
236 {
237  return std::vector<std::string>();
238 }
239 
240 bool te::mem::Transactor::foreignKeyExists(const std::string& /*datasetName*/, const std::string& /*name*/)
241 {
242  return false;
243 }
244 
245 void te::mem::Transactor::addForeignKey(const std::string& /*datasetName*/, te::da::ForeignKey* /*fk*/)
246 {
247 }
248 
249 void te::mem::Transactor::dropForeignKey(const std::string& /*datasetName*/, const std::string& /*fkName*/)
250 {
251 }
252 
253 std::unique_ptr<te::da::UniqueKey> te::mem::Transactor::getUniqueKey(const std::string& /*datasetName*/, const std::string& /*name*/)
254 {
255  return std::unique_ptr<te::da::UniqueKey>();
256 }
257 
258 std::vector<std::string> te::mem::Transactor::getUniqueKeyNames(const std::string& /*datasetName*/)
259 {
260  return std::vector<std::string>();
261 }
262 
263 bool te::mem::Transactor::uniqueKeyExists(const std::string& /*datasetName*/, const std::string& /*name*/)
264 {
265  return false;
266 }
267 
268 void te::mem::Transactor::addUniqueKey(const std::string& /*datasetName*/, te::da::UniqueKey* /*uk*/)
269 {
270 }
271 
272 void te::mem::Transactor::dropUniqueKey(const std::string& /*datasetName*/, const std::string& /*name*/)
273 {
274 }
275 
276 std::unique_ptr<te::da::CheckConstraint> te::mem::Transactor::getCheckConstraint(const std::string& /*datasetName*/, const std::string& /*name*/)
277 {
278  return std::unique_ptr<te::da::CheckConstraint>();
279 }
280 
281 std::vector<std::string> te::mem::Transactor::getCheckConstraintNames(const std::string& /*datasetName*/)
282 {
283  return std::vector<std::string>();
284 }
285 
286 bool te::mem::Transactor::checkConstraintExists(const std::string& /*datasetName*/, const std::string& /*name*/)
287 {
288  return false;
289 }
290 
291 void te::mem::Transactor::addCheckConstraint(const std::string& /*datasetName*/, te::da::CheckConstraint* /*cc*/)
292 {
293 }
294 
295 void te::mem::Transactor::dropCheckConstraint(const std::string& /*datasetName*/, const std::string& /*name*/)
296 {
297 }
298 
299 std::unique_ptr<te::da::Index> te::mem::Transactor::getIndex(const std::string& /*datasetName*/, const std::string& /*name*/)
300 {
301  return std::unique_ptr<te::da::Index>();
302 }
303 
304 std::vector<std::string> te::mem::Transactor::getIndexNames(const std::string& /*datasetName*/)
305 {
306  return std::vector<std::string>();
307 }
308 
309 bool te::mem::Transactor::indexExists(const std::string& /*datasetName*/, const std::string& /*name*/)
310 {
311  return false;
312 }
313 
314 void te::mem::Transactor::addIndex(const std::string& /*datasetName*/, te::da::Index* /*idx*/,
315  const std::map<std::string, std::string>& /*options*/)
316 {
317 }
318 
319 void te::mem::Transactor::dropIndex(const std::string& /*datasetName*/, const std::string& /*idxName*/)
320 {
321 }
322 
323 std::unique_ptr<te::da::Sequence> te::mem::Transactor::getSequence(const std::string& /*name*/)
324 {
325  return std::unique_ptr<te::da::Sequence>();
326 }
327 
328 std::vector<std::string> te::mem::Transactor::getSequenceNames()
329 {
330  return std::vector<std::string>();
331 }
332 
333 bool te::mem::Transactor::sequenceExists(const std::string& /*name*/)
334 {
335  return false;
336 }
337 
339 {
340 }
341 
342 void te::mem::Transactor::dropSequence(const std::string& /*name*/)
343 {
344 }
345 
346 std::unique_ptr<te::gm::Envelope> te::mem::Transactor::getExtent(const std::string& /*datasetName*/,
347  const std::string& /*propertyName*/)
348 {
349  return std::unique_ptr<te::gm::Envelope>();
350 }
351 
352 std::unique_ptr<te::gm::Envelope> te::mem::Transactor::getExtent(const std::string& /*datasetName*/,
353  std::size_t /*propertyPos*/)
354 {
355  return std::unique_ptr<te::gm::Envelope>();
356 }
357 
358 std::size_t te::mem::Transactor::getNumberOfItems(const std::string& datasetName)
359 {
360  return m_ds->getNumberOfItems(datasetName);
361 }
362 
364 {
365  return m_ds->hasDataSets();
366 }
367 
368 bool te::mem::Transactor::dataSetExists(const std::string& name)
369 {
370  return m_ds->dataSetExists(name);
371 }
372 
373 void te::mem::Transactor::createDataSet(te::da::DataSetType* dt, const std::map<std::string, std::string>& options)
374 {
375  m_ds->createDataSet(dt, options);
376 }
377 
378 void te::mem::Transactor::cloneDataSet(const std::string& name,
379  const std::string& cloneName,
380  const std::map<std::string, std::string>& options)
381 {
382  m_ds->cloneDataSet(name, cloneName, options);
383 }
384 
385 void te::mem::Transactor::dropDataSet(const std::string& name)
386 {
387  m_ds->dropDataSet(name);
388 }
389 
390 void te::mem::Transactor::renameDataSet(const std::string& name, const std::string& newName)
391 {
392  m_ds->renameDataSet(name, newName);
393 }
394 
395 void te::mem::Transactor::add(const std::string& datasetName,
397  const std::map<std::string, std::string>& options,
398  std::size_t limit)
399 {
400  m_ds->add(datasetName, d, options, limit);
401 }
402 
403 void te::mem::Transactor::remove(const std::string& datasetName, const te::da::ObjectIdSet* oids)
404 {
405  m_ds->remove(datasetName, oids);
406 }
407 
408 void te::mem::Transactor::update(const std::string& datasetName,
409  te::da::DataSet* dataset,
410  const std::vector<std::size_t>& properties,
411  const te::da::ObjectIdSet* oids,
412  const std::map<std::string, std::string>& options,
413  std::size_t limit)
414 {
415  m_ds->update(datasetName, dataset, properties, oids, options, limit);
416 }
417 
418 void te::mem::Transactor::optimize(const std::map<std::string, std::string>& /*opInfo*/)
419 {
420 }
std::size_t getNumberOfProperties(const std::string &datasetName)
It gets the number of properties of the given dataset.
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.
std::size_t getNumberOfItems(const std::string &datasetName)
It retrieves the number of items of the given dataset.
An implementation of the Transactor class for the Memory Data Access driver.
std::size_t getNumberOfProperties(const std::string &datasetName)
It gets the number of properties of the given dataset.
std::vector< std::string > getDataSetNames()
It It gets the dataset names available in the data source.
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.
std::unique_ptr< te::da::PrimaryKey > getPrimaryKey(const std::string &datasetName)
It retrieves the primary key of the 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.
std::vector< std::string > getPropertyNames(const std::string &datasetName)
It gets the property names of the given dataset.
bool dataSetExists(const std::string &name)
It checks if a dataset with the given name exists in the data source.
A class that models the description of a dataset.
Definition: DataSetType.h:72
bool isDataSetNameValid(const std::string &datasetName)
It returns true if the given string is a valid dataset name.
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.
std::unique_ptr< te::da::DataSet > query(const te::da::Select &q, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false)
bool uniqueKeyExists(const std::string &datasetName, const std::string &name)
It checks if a unique key with the given name exists in the dataset.
std::size_t getNumberOfDataSets()
It retrieves the number of data sets available in the data source.
std::unique_ptr< te::da::DataSetType > getDataSetType(const std::string &name)
It gets information about the given dataset.
void dropUniqueKey(const std::string &datasetName, const std::string &name)
It removes the unique key constraint from the dataset.
An exception class for the TerraLib In-Memory Data Access driver.
boost::ptr_vector< te::dt::Property > getProperties(const std::string &datasetName)
It retrieves the properties of the dataset.
std::unique_ptr< te::da::DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false)
std::unique_ptr< te::da::DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess)
It gets the dataset identified by the given name. This method always returns a disconnected dataset...
SpatialRelation
Spatial relations between geometric objects.
It describes a sequence (a number generator).
bool hasDataSets()
It checks if the data source has any dataset.
bool hasDataSets()
It checks if the data source has any 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.
DataSource * m_ds
The associated data source.
static te::dt::Date ds(2010, 01, 01)
A class that describes a check constraint.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
void dropForeignKey(const std::string &datasetName, const std::string &fkName)
It removes the foreign key constraint from the dataset schema.
std::size_t getNumberOfItems(const std::string &datasetName)
It retrieves the number of items of the given 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...
bool dataSetExists(const std::string &name)
It checks if a dataset with the given name exists in the data source.
bool isInTransaction() const
It returns true if a transaction is in progress, otherwise, it returns false.
It models a property definition.
Definition: Property.h:59
void addCheckConstraint(const std::string &datasetName, te::da::CheckConstraint *cc)
It adds a check constraint to the dataset.
void addForeignKey(const std::string &datasetName, te::da::ForeignKey *fk)
It adds a foreign key constraint to a 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.
Transactor(DataSource *ds)
Constructor.
std::unique_ptr< te::da::ForeignKey > getForeignKey(const std::string &datasetName, const std::string &name)
It retrieves the foreign key 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.
bool propertyExists(const std::string &datasetName, const std::string &name)
It checks if a property with the given name exists in the dataset.
void dropDataSet(const std::string &name)
It removes the dataset schema from the data source.
void execute(const te::da::Query &command)
It executes the specified command using a generic query representation.
TraverseType
A dataset can be traversed in two ways:
void begin()
It starts a new transaction.
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.
void cancel()
It requests that the data source stop the processing of the current command.
std::vector< std::string > getForeignKeyNames(const std::string &datasetName)
It gets the foreign key names of the given dataset.
void add(const std::string &datasetName, te::da::DataSet *d, const std::map< std::string, std::string > &options, std::size_t limit)
It adds data items to the dataset in the data source.
An Envelope defines a 2D rectangular region.
bool sequenceExists(const std::string &name)
It checks if a sequence with the given name exists in the data source.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
Definition: ObjectIdSet.h:55
std::vector< std::string > getIndexNames(const std::string &datasetName)
It gets the index names of the given dataset.
void renameDataSet(const std::string &name, const std::string &newName)
It renames a dataset.
void commit()
It commits the transaction.
std::vector< std::string > getCheckConstraintNames(const std::string &datasetName)
It gets the check constraint names of the given dataset.
void renameProperty(const std::string &datasetName, const std::string &propertyName, const std::string &newPropertyName)
It renames a property of the given dataset.
std::string escape(const std::string &value)
It escapes a string for using in commands and queries.
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.
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
static te::dt::TimeDuration dt(20, 30, 50, 11)
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.
te::gm::Polygon * p
It models a foreign key constraint for a DataSetType.
Definition: ForeignKey.h:50
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.
bool indexExists(const std::string &datasetName, const std::string &name)
It checks if an index with the given name exists in the dataset.
It describes a unique key (uk) constraint.
Definition: UniqueKey.h:53
void dropIndex(const std::string &datasetName, const std::string &idxName)
It removes the index from the dataset schema.
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
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.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
void rollBack()
It aborts the transaction. Any changes will be rolled-back.
void addProperty(const std::string &datasetName, te::dt::Property *p)
It adds a new property to the dataset schema.
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:65
std::unique_ptr< te::da::Sequence > getSequence(const std::string &name)
It gets the sequence with the given name in the data source.
void renameDataSet(const std::string &name, const std::string &newName)
It renames a dataset.
void dropProperty(const std::string &datasetName, const std::string &name)
It removes a property from the given dataset.
bool propertyExists(const std::string &datasetName, const std::string &name)
It checks if a property with the given name exists in the dataset.
void addPrimaryKey(const std::string &datasetName, te::da::PrimaryKey *pk)
It adds a primary key constraint to the dataset schema.
A dataset is the unit of information manipulated by the data access module of TerraLib.
std::unique_ptr< te::da::BatchExecutor > getBatchExecutor()
It creates a batch command executor.
void addSequence(te::da::Sequence *sequence)
It creates a new sequence 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)
void remove(const std::string &datasetName, const te::da::ObjectIdSet *oids=0)
It removes all the informed items from the dataset.
bool isPropertyNameValid(const std::string &propertyName)
It checks if the given property name is valid.
void dropPrimaryKey(const std::string &datasetName)
It removes the primary key constraint from the dataset schema.
It describes a primary key (pk) constraint.
Definition: PrimaryKey.h:52
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.
std::vector< std::string > getSequenceNames()
It gets the sequence names available in the data source.
void addProperty(const std::string &datasetName, te::dt::Property *p)
It adds a new property to the dataset schema.
std::unique_ptr< te::da::DataSetType > getDataSetType(const std::string &datasetName)
It gets information about the given dataset.
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.
boost::ptr_vector< te::dt::Property > getProperties(const std::string &datasetName)
It retrieves the properties of the dataset.
std::size_t getNumberOfDataSets()
It retrieves the number of data sets available in the data source.
std::vector< std::string > getPropertyNames(const std::string &datasetName)
It gets the property names of the given dataset.
void dropDataSet(const std::string &name)
It removes the dataset schema from the data source.
std::vector< std::string > getDataSetNames()
It gets the dataset names available in the data source.
void dropCheckConstraint(const std::string &datasetName, const std::string &name)
It removes the check constraint from the dataset.
void renameProperty(const std::string &datasetName, const std::string &name, const std::string &newName)
It renames a property of the given dataset.
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
void dropSequence(const std::string &name)
It removes the sequence from the data source.
std::vector< std::string > getUniqueKeyNames(const std::string &datasetName)
It gets the unique key names of the given dataset.
void remove(const std::string &datasetName, const te::da::ObjectIdSet *oids)
It removes all the informed items from the dataset.
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.
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.
bool primaryKeyExists(const std::string &datasetName, const std::string &name)
It checks if a primary key exists in the dataset.
A Query is independent from the data source language/dialect.
Definition: Query.h:46
It describes an index associated to a DataSetType.
te::da::DataSource * getDataSource() const
It returns the parent data source of the transactor.
void dropProperty(const std::string &datasetName, const std::string &propertyName)
It removes a property from the given dataset.
void addUniqueKey(const std::string &datasetName, te::da::UniqueKey *uk)
It adds a unique key constraint to the dataset.
boost::int64_t getLastGeneratedId()
It returns the last id generated by an insertion command.