All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 "../common/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 {
43 }
44 
46 {
47  return m_ds;
48 }
49 
51 {
52 // Not supported by the Memory Driver!
53 }
54 
56 {
57 // Not supported by the Memory Driver!
58 }
59 
61 {
62 // Not supported by the Memory Driver!
63 }
64 
66 {
67  return false;
68 }
69 
70 std::auto_ptr<te::da::DataSet> te::mem::Transactor::getDataSet(const std::string& name,
71  te::common::TraverseType travType,
72  bool /*connected*/)
73 {
74  return m_ds->getDataSet(name, travType);
75 }
76 
77 std::auto_ptr<te::da::DataSet> te::mem::Transactor::getDataSet(const std::string& name,
78  const std::string& propertyName,
79  const te::gm::Envelope* e,
81  te::common::TraverseType travType,
82  bool /*connected*/)
83 {
84  return std::auto_ptr<te::da::DataSet>(0);
85 }
86 
87 std::auto_ptr<te::da::DataSet> te::mem::Transactor::getDataSet(const std::string& name,
88  const std::string& propertyName,
89  const te::gm::Geometry* g,
91  te::common::TraverseType travType,
92  bool /*connected*/)
93 {
94  return std::auto_ptr<te::da::DataSet>(0);
95 }
96 
97 std::auto_ptr<te::da::DataSet> te::mem::Transactor::query(const te::da::Select& q,
98  te::common::TraverseType travType,
99  bool /*connected*/)
100 {
101  return std::auto_ptr<te::da::DataSet>(0);
102 }
103 
104 std::auto_ptr<te::da::DataSet> te::mem::Transactor::query(const std::string& q,
105  te::common::TraverseType travType,
106  bool /*connected*/)
107 {
108  return std::auto_ptr<te::da::DataSet>(0);
109 }
110 
112 {
113 }
114 
115 void te::mem::Transactor::execute(const std::string& /*command*/)
116 {
117 }
118 
119 std::auto_ptr<te::da::PreparedQuery> te::mem::Transactor::getPrepared(const std::string& qName)
120 {
121  return std::auto_ptr<te::da::PreparedQuery>(0);
122 }
123 
124 std::auto_ptr<te::da::BatchExecutor> te::mem::Transactor::getBatchExecutor()
125 {
126  return std::auto_ptr<te::da::BatchExecutor>(0);
127 }
128 
130 {
131 }
132 
134 {
135  return 0;
136 }
137 
138 std::string te::mem::Transactor::escape(const std::string& value)
139 {
140  return std::string(value);
141 }
142 
143 bool te::mem::Transactor::isDataSetNameValid(const std::string& datasetName)
144 {
145  return true;
146 }
147 
148 bool te::mem::Transactor::isPropertyNameValid(const std::string& propertyName)
149 {
150  return true;
151 }
152 
153 std::vector<std::string> te::mem::Transactor::getDataSetNames()
154 {
155  return m_ds->getDataSetNames();
156 }
157 
159 {
160  return m_ds->getNumberOfDataSets();
161 }
162 
163 std::auto_ptr<te::da::DataSetType> te::mem::Transactor::getDataSetType(const std::string& name)
164 {
165  return m_ds->getDataSetType(name);
166 }
167 
168 boost::ptr_vector<te::dt::Property> te::mem::Transactor::getProperties(const std::string& datasetName)
169 {
170  return m_ds->getProperties(datasetName);
171 }
172 
173 std::auto_ptr<te::dt::Property> te::mem::Transactor::getProperty(const std::string& datasetName, const std::string& name)
174 {
175  return m_ds->getProperty(datasetName, name);
176 }
177 
178 std::auto_ptr<te::dt::Property> te::mem::Transactor::getProperty(const std::string& datasetName, std::size_t propertyPos)
179 {
180  return m_ds->getProperty(datasetName, propertyPos);
181 }
182 
183 std::vector<std::string> te::mem::Transactor::getPropertyNames(const std::string& datasetName)
184 {
185  return m_ds->getPropertyNames(datasetName);
186 }
187 
188 std::size_t te::mem::Transactor::getNumberOfProperties(const std::string& datasetName)
189 {
190  return m_ds->getNumberOfProperties(datasetName);
191 }
192 
193 bool te::mem::Transactor::propertyExists(const std::string& datasetName, const std::string& name)
194 {
195  return m_ds->propertyExists(datasetName, name);
196 }
197 
198 void te::mem::Transactor::addProperty(const std::string& datasetName, te::dt::Property* p)
199 {
200  m_ds->addProperty(datasetName, p);
201 }
202 
203 void te::mem::Transactor::dropProperty(const std::string& datasetName, const std::string& name)
204 {
205  m_ds->dropProperty(datasetName, name);
206 }
207 
208 void te::mem::Transactor::renameProperty(const std::string& datasetName,
209  const std::string& propertyName,
210  const std::string& newPropertyName)
211 {
212  m_ds->renameProperty(datasetName, propertyName, newPropertyName);
213 }
214 
215 std::auto_ptr<te::da::PrimaryKey> te::mem::Transactor::getPrimaryKey(const std::string& datasetName)
216 {
217  return std::auto_ptr<te::da::PrimaryKey>(0);
218 }
219 
220 bool te::mem::Transactor::primaryKeyExists(const std::string& /*datasetName*/, const std::string& /*name*/)
221 {
222  return false;
223 }
224 
225 void te::mem::Transactor::addPrimaryKey(const std::string& /*datasetName*/, te::da::PrimaryKey* /*pk*/)
226 {
227 }
228 
229 void te::mem::Transactor::dropPrimaryKey(const std::string& /*datasetName*/)
230 {
231 }
232 
233 std::auto_ptr<te::da::ForeignKey> te::mem::Transactor::getForeignKey(const std::string& /*datasetName*/, const std::string& /*name*/)
234 {
235  return std::auto_ptr<te::da::ForeignKey>(0);
236 }
237 
238 std::vector<std::string> te::mem::Transactor::getForeignKeyNames(const std::string& /*datasetName*/)
239 {
240  return std::vector<std::string>();
241 }
242 
243 bool te::mem::Transactor::foreignKeyExists(const std::string& /*datasetName*/, const std::string& /*name*/)
244 {
245  return false;
246 }
247 
248 void te::mem::Transactor::addForeignKey(const std::string& /*datasetName*/, te::da::ForeignKey* /*fk*/)
249 {
250 }
251 
252 void te::mem::Transactor::dropForeignKey(const std::string& /*datasetName*/, const std::string& /*fkName*/)
253 {
254 }
255 
256 std::auto_ptr<te::da::UniqueKey> te::mem::Transactor::getUniqueKey(const std::string& /*datasetName*/, const std::string& /*name*/)
257 {
258  return std::auto_ptr<te::da::UniqueKey>(0);
259 }
260 
261 std::vector<std::string> te::mem::Transactor::getUniqueKeyNames(const std::string& /*datasetName*/)
262 {
263  return std::vector<std::string>();
264 }
265 
266 bool te::mem::Transactor::uniqueKeyExists(const std::string& /*datasetName*/, const std::string& /*name*/)
267 {
268  return false;
269 }
270 
271 void te::mem::Transactor::addUniqueKey(const std::string& /*datasetName*/, te::da::UniqueKey* /*uk*/)
272 {
273 }
274 
275 void te::mem::Transactor::dropUniqueKey(const std::string& /*datasetName*/, const std::string& /*name*/)
276 {
277 }
278 
279 std::auto_ptr<te::da::CheckConstraint> te::mem::Transactor::getCheckConstraint(const std::string& /*datasetName*/, const std::string& /*name*/)
280 {
281  return std::auto_ptr<te::da::CheckConstraint>(0);
282 }
283 
284 std::vector<std::string> te::mem::Transactor::getCheckConstraintNames(const std::string& /*datasetName*/)
285 {
286  return std::vector<std::string>();
287 }
288 
289 bool te::mem::Transactor::checkConstraintExists(const std::string& /*datasetName*/, const std::string& /*name*/)
290 {
291  return false;
292 }
293 
294 void te::mem::Transactor::addCheckConstraint(const std::string& /*datasetName*/, te::da::CheckConstraint* /*cc*/)
295 {
296 }
297 
298 void te::mem::Transactor::dropCheckConstraint(const std::string& /*datasetName*/, const std::string& /*name*/)
299 {
300 }
301 
302 std::auto_ptr<te::da::Index> te::mem::Transactor::getIndex(const std::string& /*datasetName*/, const std::string& /*name*/)
303 {
304  return std::auto_ptr<te::da::Index>();
305 }
306 
307 std::vector<std::string> te::mem::Transactor::getIndexNames(const std::string& /*datasetName*/)
308 {
309  return std::vector<std::string>();
310 }
311 
312 bool te::mem::Transactor::indexExists(const std::string& /*datasetName*/, const std::string& /*name*/)
313 {
314  return false;
315 }
316 
317 void te::mem::Transactor::addIndex(const std::string& /*datasetName*/, te::da::Index* /*idx*/,
318  const std::map<std::string, std::string>& /*options*/)
319 {
320 }
321 
322 void te::mem::Transactor::dropIndex(const std::string& /*datasetName*/, const std::string& /*idxName*/)
323 {
324 }
325 
326 std::auto_ptr<te::da::Sequence> te::mem::Transactor::getSequence(const std::string& /*name*/)
327 {
328  return std::auto_ptr<te::da::Sequence>(0);
329 }
330 
331 std::vector<std::string> te::mem::Transactor::getSequenceNames()
332 {
333  return std::vector<std::string>();
334 }
335 
336 bool te::mem::Transactor::sequenceExists(const std::string& /*name*/)
337 {
338  return false;
339 }
340 
342 {
343 }
344 
345 void te::mem::Transactor::dropSequence(const std::string& /*name*/)
346 {
347 }
348 
349 std::auto_ptr<te::gm::Envelope> te::mem::Transactor::getExtent(const std::string& /*datasetName*/,
350  const std::string& /*propertyName*/)
351 {
352  return std::auto_ptr<te::gm::Envelope>(0);
353 }
354 
355 std::auto_ptr<te::gm::Envelope> te::mem::Transactor::getExtent(const std::string& /*datasetName*/,
356  std::size_t /*propertyPos*/)
357 {
358  return std::auto_ptr<te::gm::Envelope>(0);
359 }
360 
361 std::size_t te::mem::Transactor::getNumberOfItems(const std::string& datasetName)
362 {
363  return m_ds->getNumberOfItems(datasetName);
364 }
365 
367 {
368  return m_ds->hasDataSets();
369 }
370 
371 bool te::mem::Transactor::dataSetExists(const std::string& name)
372 {
373  return m_ds->dataSetExists(name);
374 }
375 
376 void te::mem::Transactor::createDataSet(te::da::DataSetType* dt, const std::map<std::string, std::string>& options)
377 {
378  m_ds->createDataSet(dt, options);
379 }
380 
381 void te::mem::Transactor::cloneDataSet(const std::string& name,
382  const std::string& cloneName,
383  const std::map<std::string, std::string>& options)
384 {
385  m_ds->cloneDataSet(name, cloneName, options);
386 }
387 
388 void te::mem::Transactor::dropDataSet(const std::string& name)
389 {
390  m_ds->dropDataSet(name);
391 }
392 
393 void te::mem::Transactor::renameDataSet(const std::string& name, const std::string& newName)
394 {
395  m_ds->renameDataSet(name, newName);
396 }
397 
398 void te::mem::Transactor::add(const std::string& datasetName,
399  te::da::DataSet* d,
400  const std::map<std::string, std::string>& options,
401  std::size_t limit)
402 {
403  m_ds->add(datasetName, d, options, limit);
404 }
405 
406 void te::mem::Transactor::remove(const std::string& datasetName, const te::da::ObjectIdSet* oids)
407 {
408  m_ds->remove(datasetName, oids);
409 }
410 
411 void te::mem::Transactor::update(const std::string& datasetName,
412  te::da::DataSet* dataset,
413  const std::vector<std::size_t>& properties,
414  const te::da::ObjectIdSet* oids,
415  const std::map<std::string, std::string>& options,
416  std::size_t limit)
417 {
418  m_ds->update(datasetName, dataset, properties, oids, options, limit);
419 }
420 
421 void te::mem::Transactor::optimize(const std::map<std::string, std::string>& /*opInfo*/)
422 {
423 }
424 
426 {
427  return te::common::UTF8;
428 }
std::size_t getNumberOfProperties(const std::string &datasetName)
It gets the number of properties of the given dataset.
Definition: Transactor.cpp:188
te::common::CharEncoding getEncoding()
It return the DataSource current encoding.
Definition: Transactor.cpp:425
CharEncoding
Supported charsets (character encoding).
std::vector< std::string > getDataSetNames()
It It gets the dataset names available in the data source.
Definition: Transactor.cpp:153
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.
Definition: Transactor.cpp:256
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.
Definition: Transactor.cpp:317
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.
Definition: Transactor.cpp:143
bool uniqueKeyExists(const std::string &datasetName, const std::string &name)
It checks if a unique key with the given name exists in the dataset.
Definition: Transactor.cpp:266
void dropUniqueKey(const std::string &datasetName, const std::string &name)
It removes the unique key constraint from the dataset.
Definition: Transactor.cpp:275
SpatialRelation
Spatial relations between geometric objects.
Definition: Enums.h:122
It describes a sequence (a number generator).
Definition: Sequence.h:56
bool hasDataSets()
It checks if the data source has any dataset.
Definition: Transactor.cpp:366
A class that describes a check constraint.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
Definition: DataSource.h:118
void dropForeignKey(const std::string &datasetName, const std::string &fkName)
It removes the foreign key constraint from the dataset schema.
Definition: Transactor.cpp:252
std::size_t getNumberOfItems(const std::string &datasetName)
It retrieves the number of items of the given dataset.
Definition: Transactor.cpp:361
An exception class for the TerraLib In-Memory Data Access driver.
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...
Definition: Transactor.cpp:421
bool dataSetExists(const std::string &name)
It checks if a dataset with the given name exists in the data source.
Definition: Transactor.cpp:371
bool isInTransaction() const
It returns true if a transaction is in progress, otherwise, it returns false.
Definition: Transactor.cpp:65
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.
Definition: Transactor.cpp:294
void addForeignKey(const std::string &datasetName, te::da::ForeignKey *fk)
It adds a foreign key constraint to a dataset.
Definition: Transactor.cpp:248
Transactor(DataSource *ds)
Constructor.
Definition: Transactor.cpp:36
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.
Definition: Transactor.cpp:349
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.
Definition: Transactor.cpp:289
void execute(const te::da::Query &command)
It executes the specified command using a generic query representation.
Definition: Transactor.cpp:111
TraverseType
A dataset can be traversed in two ways:
Definition: Enums.h:53
std::auto_ptr< te::da::DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false)
Definition: Transactor.cpp:70
void begin()
It starts a new transaction.
Definition: Transactor.cpp:50
void cancel()
It requests that the data source stop the processing of the current command.
Definition: Transactor.cpp:129
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.
Definition: Transactor.cpp:173
std::vector< std::string > getForeignKeyNames(const std::string &datasetName)
It gets the foreign key names of the given dataset.
Definition: Transactor.cpp:238
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
bool sequenceExists(const std::string &name)
It checks if a sequence with the given name exists in the data source.
Definition: Transactor.cpp:336
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.
Definition: Transactor.cpp:307
std::auto_ptr< te::da::ForeignKey > getForeignKey(const std::string &datasetName, const std::string &name)
It retrieves the foreign key from the given dataset.
Definition: Transactor.cpp:233
void commit()
It commits the transaction.
Definition: Transactor.cpp:55
std::vector< std::string > getCheckConstraintNames(const std::string &datasetName)
It gets the check constraint names of the given dataset.
Definition: Transactor.cpp:284
void renameProperty(const std::string &datasetName, const std::string &propertyName, const std::string &newPropertyName)
It renames a property of the given dataset.
Definition: Transactor.cpp:208
std::string escape(const std::string &value)
It escapes a string for using in commands and queries.
Definition: Transactor.cpp:138
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.
Definition: Transactor.cpp:243
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.
Definition: Transactor.cpp:411
It models a foreign key constraint for a DataSetType.
Definition: ForeignKey.h:50
bool indexExists(const std::string &datasetName, const std::string &name)
It checks if an index with the given name exists in the dataset.
Definition: Transactor.cpp:312
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.
Definition: Transactor.cpp:322
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.
Definition: Transactor.cpp:376
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
void rollBack()
It aborts the transaction. Any changes will be rolled-back.
Definition: Transactor.cpp:60
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:65
void renameDataSet(const std::string &name, const std::string &newName)
It renames a dataset.
Definition: Transactor.cpp:393
void dropProperty(const std::string &datasetName, const std::string &name)
It removes a property from the given dataset.
Definition: Transactor.cpp:203
bool propertyExists(const std::string &datasetName, const std::string &name)
It checks if a property with the given name exists in the dataset.
Definition: Transactor.cpp:193
std::auto_ptr< te::da::DataSet > query(const te::da::Select &q, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false)
Definition: Transactor.cpp:97
std::auto_ptr< te::da::BatchExecutor > getBatchExecutor()
It creates a batch command executor.
Definition: Transactor.cpp:124
void addPrimaryKey(const std::string &datasetName, te::da::PrimaryKey *pk)
It adds a primary key constraint to the dataset schema.
Definition: Transactor.cpp:225
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
void addSequence(te::da::Sequence *sequence)
It creates a new sequence in the data source.
Definition: Transactor.cpp:341
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.
Definition: Transactor.cpp:398
void remove(const std::string &datasetName, const te::da::ObjectIdSet *oids=0)
It removes all the informed items from the dataset.
Definition: Transactor.cpp:406
An implementation of the Transactor class for the Memory Data Access driver.
bool isPropertyNameValid(const std::string &propertyName)
It checks if the given property name is valid.
Definition: Transactor.cpp:148
void dropPrimaryKey(const std::string &datasetName)
It removes the primary key constraint from the dataset schema.
Definition: Transactor.cpp:229
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.
Definition: Transactor.cpp:302
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.
Definition: Transactor.cpp:119
It describes a primary key (pk) constraint.
Definition: PrimaryKey.h:52
std::auto_ptr< te::da::DataSetType > getDataSetType(const std::string &name)
It gets information about the given dataset.
Definition: Transactor.cpp:163
std::vector< std::string > getSequenceNames()
It gets the sequence names available in the data source.
Definition: Transactor.cpp:331
void addProperty(const std::string &datasetName, te::dt::Property *p)
It adds a new property to the dataset schema.
Definition: Transactor.cpp:198
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.
Definition: Transactor.cpp:279
boost::ptr_vector< te::dt::Property > getProperties(const std::string &datasetName)
It retrieves the properties of the dataset.
Definition: Transactor.cpp:168
std::size_t getNumberOfDataSets()
It retrieves the number of data sets available in the data source.
Definition: Transactor.cpp:158
std::vector< std::string > getPropertyNames(const std::string &datasetName)
It gets the property names of the given dataset.
Definition: Transactor.cpp:183
void dropDataSet(const std::string &name)
It removes the dataset schema from the data source.
Definition: Transactor.cpp:388
void dropCheckConstraint(const std::string &datasetName, const std::string &name)
It removes the check constraint from the dataset.
Definition: Transactor.cpp:298
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
Definition: DataSource.h:52
void dropSequence(const std::string &name)
It removes the sequence from the data source.
Definition: Transactor.cpp:345
std::vector< std::string > getUniqueKeyNames(const std::string &datasetName)
It gets the unique key names of the given dataset.
Definition: Transactor.cpp:261
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.
Definition: Transactor.cpp:381
bool primaryKeyExists(const std::string &datasetName, const std::string &name)
It checks if a primary key exists in the dataset.
Definition: Transactor.cpp:220
A Query is independent from the data source language/dialect.
Definition: Query.h:46
It describes an index associated to a DataSetType.
Definition: Index.h:54
te::da::DataSource * getDataSource() const
It returns the parent data source of the transactor.
Definition: Transactor.cpp:45
std::auto_ptr< te::da::Sequence > getSequence(const std::string &name)
It gets the sequence with the given name in the data source.
Definition: Transactor.cpp:326
void addUniqueKey(const std::string &datasetName, te::da::UniqueKey *uk)
It adds a unique key constraint to the dataset.
Definition: Transactor.cpp:271
std::auto_ptr< te::da::PrimaryKey > getPrimaryKey(const std::string &datasetName)
It retrieves the primary key of the dataset.
Definition: Transactor.cpp:215
boost::int64_t getLastGeneratedId()
It returns the last id generated by an insertion command.
Definition: Transactor.cpp:133