te::gpkg::Transactor Class Reference

#include <Transactor.h>

Inheritance diagram for te::gpkg::Transactor:
te::da::DataSourceTransactor

Public Member Functions

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. More...
 
void addCheckConstraint (const std::string &datasetName, te::da::CheckConstraint *cc)
 It adds a check constraint to the dataset. More...
 
void addForeignKey (const std::string &datasetName, te::da::ForeignKey *fk)
 It adds a foreign key constraint to a dataset. More...
 
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. More...
 
void addPrimaryKey (const std::string &datasetName, te::da::PrimaryKey *pk)
 It adds a primary key constraint to the dataset schema. More...
 
void addProperty (const std::string &datasetName, te::dt::Property *p)
 It adds a new property to the dataset schema. More...
 
void addSequence (te::da::Sequence *sequence)
 It creates a new sequence in the data source. More...
 
void addUniqueKey (const std::string &datasetName, te::da::UniqueKey *uk)
 It adds a unique key constraint to the dataset. More...
 
void begin ()
 It starts a new transaction. More...
 
void cancel ()
 It requests that the data source stop the processing of the current command. More...
 
void changePropertyDefinition (const std::string &datasetName, const std::string &propName, te::dt::Property *newProp)
 
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. More...
 
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. More...
 
void commit ()
 It commits the transaction. More...
 
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. More...
 
bool dataSetExists (const std::string &name)
 It checks if a dataset with the given name exists in the data source. More...
 
void dropCheckConstraint (const std::string &datasetName, const std::string &name)
 It removes the check constraint from the dataset. More...
 
void dropDataSet (const std::string &name)
 It removes the dataset schema from the data source. More...
 
void dropForeignKey (const std::string &datasetName, const std::string &fkName)
 It removes the foreign key constraint from the dataset schema. More...
 
void dropIndex (const std::string &datasetName, const std::string &idxName)
 It removes the index from the dataset schema. More...
 
void dropPrimaryKey (const std::string &datasetName)
 It removes the primary key constraint from the dataset schema. More...
 
void dropProperty (const std::string &datasetName, const std::string &name)
 It removes a property from the given dataset. More...
 
void dropSequence (const std::string &name)
 It removes the sequence from the data source. More...
 
void dropUniqueKey (const std::string &datasetName, const std::string &name)
 It removes the unique key constraint from the dataset. More...
 
std::string escape (const std::string &value)
 It escapes a string for using in commands and queries. More...
 
void execute (const te::da::Query &command)
 It executes the specified command using a generic query representation. More...
 
void execute (const std::string &command)
 It executes the specifed command in the data source native language. More...
 
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. More...
 
std::auto_ptr< te::da::BatchExecutorgetBatchExecutor ()
 It creates a batch command executor. More...
 
std::auto_ptr< te::da::DataSetTypeCapabilitiesgetCapabilities (const std::string &name)
 It gets capabilities about a data set. More...
 
std::auto_ptr< te::da::CheckConstraintgetCheckConstraint (const std::string &datasetName, const std::string &name)
 It gets the check constraint of the dataset with the given name. More...
 
std::vector< std::string > getCheckConstraintNames (const std::string &datasetName)
 It gets the check constraint names of the given dataset. More...
 
std::auto_ptr< te::da::DataSetgetDataSet (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. More...
 
std::auto_ptr< te::da::DataSetgetDataSet (const std::string &name, const std::string &propertyName, const te::gm::Envelope *e, te::gm::SpatialRelation r, 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 using a spatial filter over the specified property. 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. More...
 
std::auto_ptr< te::da::DataSetgetDataSet (const std::string &name, const std::string &propertyName, const te::gm::Geometry *g, te::gm::SpatialRelation r, 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 using a spatial filter over the given geometric property. 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. More...
 
std::vector< std::string > getDataSetNames ()
 It It gets the dataset names available in the data source. More...
 
std::auto_ptr< te::da::DataSetTypegetDataSetType (const std::string &name)
 It gets information about the given dataset. More...
 
te::da::DataSourcegetDataSource () const
 It returns the parent data source of the transactor. More...
 
te::common::CharEncoding getEncoding ()
 It return the DataSource current encoding. More...
 
std::auto_ptr< te::gm::EnvelopegetExtent (const std::string &datasetName, const std::string &propertyName)
 It retrieves the bounding rectangle of the spatial property for the given dataset. More...
 
std::auto_ptr< te::gm::EnvelopegetExtent (const std::string &datasetName, std::size_t propertyPos)
 It retrieves the bounding rectangle for the spatial property lying in the given position in the dataset. More...
 
std::auto_ptr< te::da::ForeignKeygetForeignKey (const std::string &datasetName, const std::string &name)
 It retrieves the foreign key from the given dataset. More...
 
std::vector< std::string > getForeignKeyNames (const std::string &datasetName)
 It gets the foreign key names of the given dataset. More...
 
std::auto_ptr< te::da::IndexgetIndex (const std::string &datasetName, const std::string &name)
 It gets the index with the given name from the dataset. More...
 
std::vector< std::string > getIndexNames (const std::string &datasetName)
 It gets the index names of the given dataset. More...
 
boost::int64_t getLastGeneratedId ()
 It returns the last id generated by an insertion command. More...
 
std::size_t getNumberOfDataSets ()
 It retrieves the number of data sets available in the data source. More...
 
std::size_t getNumberOfItems (const std::string &datasetName)
 It retrieves the number of items of the given dataset. More...
 
std::size_t getNumberOfProperties (const std::string &datasetName)
 It gets the number of properties of the given dataset. More...
 
std::auto_ptr< te::da::PreparedQuerygetPrepared (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. More...
 
std::auto_ptr< te::da::PrimaryKeygetPrimaryKey (const std::string &datasetName)
 It retrieves the primary key of the dataset. More...
 
boost::ptr_vector< te::dt::PropertygetProperties (const std::string &datasetName)
 It retrieves the properties of the dataset. More...
 
std::auto_ptr< te::dt::PropertygetProperty (const std::string &datasetName, const std::string &name)
 It retrieves the property with the given name from the dataset. More...
 
std::auto_ptr< te::dt::PropertygetProperty (const std::string &datasetName, std::size_t propertyPos)
 It retrieves the property lying in the given position from the dataset. More...
 
std::vector< std::string > getPropertyNames (const std::string &datasetName)
 It gets the property names of the given dataset. More...
 
std::auto_ptr< te::da::SequencegetSequence (const std::string &name)
 It gets the sequence with the given name in the data source. More...
 
std::vector< std::string > getSequenceNames ()
 It gets the sequence names available in the data source. More...
 
std::auto_ptr< te::da::UniqueKeygetUniqueKey (const std::string &datasetName, const std::string &name)
 It gets the unique key in the dataset with the given name. More...
 
std::vector< std::string > getUniqueKeyNames (const std::string &datasetName)
 It gets the unique key names of the given dataset. More...
 
bool hasDataSets ()
 It checks if the data source has any dataset. More...
 
bool indexExists (const std::string &datasetName, const std::string &name)
 It checks if an index with the given name exists in the dataset. More...
 
bool isInTransaction () const
 It returns true if a transaction is in progress, otherwise, it returns false. More...
 
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. More...
 
bool primaryKeyExists (const std::string &datasetName, const std::string &name)
 It checks if a primary key exists in the dataset. More...
 
bool propertyExists (const std::string &datasetName, const std::string &name)
 It checks if a property with the given name exists in the dataset. More...
 
std::auto_ptr< te::da::DataSetquery (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 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. This method is different of the method that accepts a dataset name and a spatial filter, because it allows the retrieving of only a subset of the attributes, since a query can include a property list. More...
 
std::auto_ptr< te::da::DataSetquery (const std::string &query, 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 the data source native language. 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. More...
 
void remove (const std::string &datasetName, const te::da::ObjectIdSet *oids=0)
 It removes all the informed items from the dataset. More...
 
void renameDataSet (const std::string &name, const std::string &newName)
 It renames a dataset. More...
 
void renameProperty (const std::string &datasetName, const std::string &propertyName, const std::string &newPropertyName)
 It renames a property of the given dataset. More...
 
void rollBack ()
 It aborts the transaction. Any changes will be rolled-back. More...
 
bool sequenceExists (const std::string &name)
 It checks if a sequence with the given name exists in the data source. More...
 
 Transactor (DataSource *ds)
 
bool uniqueKeyExists (const std::string &datasetName, const std::string &name)
 It checks if a unique key with the given name exists in the dataset. More...
 
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. More...
 
virtual void update (const std::string &datasetName, te::da::DataSet *dataset, const std::vector< std::set< int > > &properties, const std::vector< size_t > &ids)
 It updates the contents of a dataset. More...
 
 ~Transactor ()
 
DataSet Retrieval

Methods for retrieving data from the data source.

std::auto_ptr< te::da::DataSetgetDataSet (const std::string &name, const ObjectIdSet *oids, 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 using the set of objects identification. 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. More...
 
Auxiliary Commands for Commands and Queries

Auxiliary methods for commands and queries.

virtual bool isDataSetNameValid (const std::string &datasetName)
 It returns true if the given string is a valid dataset name. More...
 
virtual bool isPropertyNameValid (const std::string &propertyName)
 It checks if the given property name is valid. More...
 

Protected Attributes

long int m_fid
 
DataSourcem_ogrDs
 

Detailed Description

Definition at line 43 of file Transactor.h.

Constructor & Destructor Documentation

te::gpkg::Transactor::Transactor ( DataSource ds)
te::gpkg::Transactor::~Transactor ( )

Member Function Documentation

void te::gpkg::Transactor::add ( const std::string &  datasetName,
te::da::DataSet d,
const std::map< std::string, std::string > &  options,
std::size_t  limit = 0 
)
virtual

It adds data items to the dataset in the data source.

Parameters
datasetNameThe target dataset name.
dThe data items to be added to the dataset.
optionsA list of optional modifiers (driver specific).
limitThe number of items to be used from the input dataset. If set to 0 (default), all items are used.
Exceptions
ExceptionAn exception can be thrown, if the input dataset items could not be added to the given dataset.
Note
The dataset reading will start in the current position. So, keep in mind that it is the caller responsability to inform the right position(and a valid one) in the dataset 'd', to start the inserting process.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::addCheckConstraint ( const std::string &  datasetName,
te::da::CheckConstraint cc 
)
virtual

It adds a check constraint to the dataset.

Parameters
datasetNameThe dataset where the constraint will be added.
ccThe check constraint.
Exceptions
ExceptionAn exception can be thrown, if the check constraint could not be added to the dataset schema.
Note
Don't delete the given check constraint, because the schema will take the ownership of it.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::addForeignKey ( const std::string &  datasetName,
te::da::ForeignKey fk 
)
virtual

It adds a foreign key constraint to a dataset.

Parameters
datasetNameThe dataset where the foreign key constraint will be added.
fkThe foreign key constraint.
Exceptions
ExceptionAn exception can be thrown, if the foreign key could not be added to the dataset schema.
Note
Don't delete the given foreign key, because the schema will take the ownership of it.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::addIndex ( const std::string &  datasetName,
te::da::Index idx,
const std::map< std::string, std::string > &  options 
)
virtual

It adds an index to the dataset.

Parameters
datasetNameThe dataset where the index will be added.
idxThe index to be added.
optionsA list of optional modifiers (driver specific).
Exceptions
ExceptionAn exception can be thrown, if the index could not be added to the dataset schema.
Note
Don't delete the given index, because the schema will take the ownership of it.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::addPrimaryKey ( const std::string &  datasetName,
te::da::PrimaryKey pk 
)
virtual

It adds a primary key constraint to the dataset schema.

Parameters
datasetNameThe name of the dataset where the primary key will be added.
pkThe primary key constraint.
Exceptions
ExceptionAn exception can be thrown, if the primary key could not be added to the dataset schema.
Note
Don't delete the given primary key, because the schema will take the ownership of it.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::addProperty ( const std::string &  datasetName,
te::dt::Property p 
)
virtual

It adds a new property to the dataset schema.

Parameters
datasetNameThe dataset where the property will be added.
pThe new property to be added.
Exceptions
ExceptionAn exception can be thrown, if the property could not be added to the dataset schema.
Note
Don't delete the given property, because the schema will take the ownership of it.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::addSequence ( te::da::Sequence sequence)
virtual

It creates a new sequence in the data source.

Exceptions
ExceptionAn exception can be thrown, if the sequence could not be added to the data source.
Note
Don't delete the given sequence, because the schema will take the ownership of it.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::addUniqueKey ( const std::string &  datasetName,
te::da::UniqueKey uk 
)
virtual

It adds a unique key constraint to the dataset.

Parameters
datasetNameThe dataset where the unique key will be added.
ukThe unique key constraint.
Exceptions
ExceptionAn exception can be thrown, if the unique key could not be added to the dataset schema.
Note
Don't delete the given unique key, because the schema will take the ownership of it.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::begin ( )
virtual

It starts a new transaction.

Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::cancel ( )
virtual

It requests that the data source stop the processing of the current command.

Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::changePropertyDefinition ( const std::string &  datasetName,
const std::string &  propName,
te::dt::Property newProp 
)
virtual

Reimplemented from te::da::DataSourceTransactor.

bool te::gpkg::Transactor::checkConstraintExists ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It checks if a check-constraint with the given name exists in the data source.

Parameters
datasetNameThe dataset name.
nameThe check-constraint name.
Exceptions
ExceptionAn exception can be thrown, if the existence of the check constraint could not be determined.
Returns
True, if the check-constraint exists in the dataset; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::cloneDataSet ( const std::string &  name,
const std::string &  cloneName,
const std::map< std::string, std::string > &  options 
)
virtual

It clones the dataset in the data source.

Parameters
nameThe dataset to be cloned.
cloneNameThe name of the cloned dataset.
optionsA list of optional modifiers. It is driver specific.
Exceptions
ExceptionAn exception can be thrown, if the dataset schema could not be cloned.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::commit ( )
virtual

It commits the transaction.

After commiting or rolling back, you can start another transaction.

Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::createDataSet ( te::da::DataSetType dt,
const std::map< std::string, std::string > &  options 
)
virtual

It creates the dataset schema definition in the target data source.

If a dataset schema with the same name already exists in the target data source, this may throw an exception.

After calling this method, the dataset schema may be updated.

Parameters
dtThe dataset schema to be created. It may be changed during the operation.
optionsA list of optional modifiers (driver specific).
Precondition
The schema of a related dataset in a foreign key must be already in the data source.
Postcondition
In some data sources, this method may output implicit indexes, sequences or constraints. The method, if necessary, will create and adjust the dataset schema.
The caller of this method will take the ownership of the given schema.
Note
If you want to create a new schema based on an already existing one, you must create a fresh copy of the DataSetType with the clone() method.
Not thread-safe!

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::dataSetExists ( const std::string &  name)
virtual

It checks if a dataset with the given name exists in the data source.

Parameters
nameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the existence of a dataset in the data source could not be determined.
Returns
True, if the dataset exists in the data source; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropCheckConstraint ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It removes the check constraint from the dataset.

Parameters
datasetNameThe dataset from where the check constraint will be removed.
nameThe check constraint to be removed.
Exceptions
ExceptionAn exception can be thrown, if the check constraint could not be removed from the dataset schema.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropDataSet ( const std::string &  name)
virtual

It removes the dataset schema from the data source.

Parameters
nameThe dataset name whose schema will be removed from the data source.
Exceptions
ExceptionAn exception can be thrown, if the dataset could not be removed from the data source.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropForeignKey ( const std::string &  datasetName,
const std::string &  fkName 
)
virtual

It removes the foreign key constraint from the dataset schema.

Parameters
datasetNameThe dataset where the foreign key will be removed.
fkNameThe foreign key to be removed.
Exceptions
ExceptionAn exception can be thrown, if the foreign key could not be removed from the dataset schema.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropIndex ( const std::string &  datasetName,
const std::string &  idxName 
)
virtual

It removes the index from the dataset schema.

Parameters
datasetNameThe dataset where the index will be removed.
idxNameThe index to be removed.
Exceptions
ExceptionAn exception can be thrown, if the index could not be removed from the dataset schema.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropPrimaryKey ( const std::string &  datasetName)
virtual

It removes the primary key constraint from the dataset schema.

Parameters
datasetNameThe dataset from where the primary key will be removed.
Exceptions
ExceptionAn exception can be thrown, if the primary key could not be dropped from the dataset schema.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropProperty ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It removes a property from the given dataset.

Parameters
datasetNameThe dataset from where the given property will be removed.
nameThe property to be removed from the dataset.
Exceptions
ExceptionAn exception can be thrown, if the dataset property could not be removed.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropSequence ( const std::string &  name)
virtual

It removes the sequence from the data source.

Parameters
nameThe sequence that will be removed.
Exceptions
ExceptionAn exception can be thrown, if the sequence could not be removed from the data source.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::dropUniqueKey ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It removes the unique key constraint from the dataset.

Parameters
datasetNameThe dataset from where the unique key will be removed.
nameThe unique key constraint name.
Exceptions
ExceptionAn exception can be thrown, if the unique key could not be removed from the dataset schema.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::string te::gpkg::Transactor::escape ( const std::string &  value)
virtual

It escapes a string for using in commands and queries.

Parameters
valueAny string.
Returns
A valid escaped string.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::execute ( const te::da::Query command)
virtual

It executes the specified command using a generic query representation.

Parameters
commandA query like: CREATE, DROP, ALTER, INSERT, UPDATE, DELETE.
Exceptions
ExceptionIt can throw an exception, if the query cannot be performed.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::execute ( const std::string &  command)
virtual

It executes the specifed command in the data source native language.

Parameters
commandA query string in the data source native language (like: CREATE, DROP, ALTER, INSERT, UPDATE, DELETE).
Exceptions
ExceptionIt can throw an exception, if the query cannot be performed.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::foreignKeyExists ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It checks if a foreign key with the given name exists in the data source.

Parameters
datasetNameThe dataset name.
nameThe foreign key name.
Exceptions
ExceptionAn exception can be thrown, if the existence of the foreign key could not be obtained.
Returns
True, if the foreign key exists in the dataset; otherwise, it returns false.

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::BatchExecutor> te::gpkg::Transactor::getBatchExecutor ( )
virtual

It creates a batch command executor.

Exceptions
ExceptionAn exception can be thrown if the batch command executor cannot be performed.
Returns
A batch command executor owned by the caller.

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSetTypeCapabilities> te::gpkg::Transactor::getCapabilities ( const std::string &  name)
virtual

It gets capabilities about a data set.

Parameters
nameName of the dataset.
Returns
The capabilities of the data set.
Note
By default it returns a fully support capabilities. If a driver does not support any capabilty, it may reimplement this function.

Reimplemented from te::da::DataSourceTransactor.

std::auto_ptr<te::da::CheckConstraint> te::gpkg::Transactor::getCheckConstraint ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It gets the check constraint of the dataset with the given name.

Parameters
datasetNameThe dataset name.
nameThe check constraint name.
Exceptions
ExceptionAn exception can be thrown, if the check constraint could not be retrieved.
Returns
The check constraint with the given name.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::vector<std::string> te::gpkg::Transactor::getCheckConstraintNames ( const std::string &  datasetName)
virtual

It gets the check constraint names of the given dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the check constraint names could not be retrieved.
Returns
The check constraint names of the dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSet> te::gpkg::Transactor::getDataSet ( const std::string &  name,
te::common::TraverseType  travType = te::common::FORWARDONLY,
bool  connected = false,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
)
virtual

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.

Parameters
nameThe dataset name.
accessPolicyAccess policy.
travTypeThe traverse type associated to the returned dataset.
connectedA flag to indicate if the returned dataset is connected or not.
Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during the data retrieval
  • if the data source driver doesn't support the traversal type
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSet> te::gpkg::Transactor::getDataSet ( const std::string &  name,
const std::string &  propertyName,
const te::gm::Envelope e,
te::gm::SpatialRelation  r,
te::common::TraverseType  travType = te::common::FORWARDONLY,
bool  connected = false,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
)
virtual

It gets the dataset identified by the given name using a spatial filter over the specified property. 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.

Parameters
nameThe dataset name.
propertyNameThe name of the spatial property that will be used to apply the spatial filter.
eA rectangle to be used as a spatial filter when retrieving datasets.
rThe spatial relation to be used during the filter.
accessPolicyAccess policy.
travTypeThe traversal type associated to the returned dataset.
connectedA flag to indicate if the returned dataset is connected or not.
Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during the data retrieval
  • if the data source driver doesn't support the traversal type
Note
The envelope coordinates should be in the same coordinate system as the dataset.
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSet> te::gpkg::Transactor::getDataSet ( const std::string &  name,
const std::string &  propertyName,
const te::gm::Geometry g,
te::gm::SpatialRelation  r,
te::common::TraverseType  travType = te::common::FORWARDONLY,
bool  connected = false,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
)
virtual

It gets the dataset identified by the given name using a spatial filter over the given geometric property. 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.

Parameters
nameThe dataset name.
propertyNameThe name of the spatial property that will be used to apply the spatial filter.
gThe geometry that will be used as a spatial filter when retrieving the dataset.
rThe spatial relation that will be used during the filtering.
accessPolicyAccess policy.
travTypeThe traverse type associated to the returned dataset.
connectedA flag to indicate if the returned dataset is connected or not.
Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during the data retrieval
  • if the data source driver doesn't support the traversal type
Note
The geometry coordinates should be in the same coordinate system as the dataset.
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSet> te::da::DataSourceTransactor::getDataSet ( const std::string &  name,
const ObjectIdSet oids,
te::common::TraverseType  travType = te::common::FORWARDONLY,
bool  connected = false,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
)
inherited

It gets the dataset identified by the given name using the set of objects identification. 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.

Parameters
nameThe dataset name of the dataset.
oidsA pointer for the set of objects. Do not pass null, nor an empty set.
accessPolicyAccess policy.
travTypeThe traverse type associated to the returned dataset.
connectedA flag to indicate if the returned dataset is connected or not.
Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during data retrieval
  • if the data source driver doesn't support the traversal type
std::vector<std::string> te::gpkg::Transactor::getDataSetNames ( )
virtual

It It gets the dataset names available in the data source.

Returns
The dataset names available in the data source.
Exceptions
ExceptionAn exception can be thrown, if the dataset names could not be retrieved.
Note
Each dataset in the data source must have a unique name. For example, in a DBMS the name may contain the schema name before the table name separated by a dot notation (".").
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSetType> te::gpkg::Transactor::getDataSetType ( const std::string &  name)
virtual

It gets information about the given dataset.

This method can provide the following information about a dataset:

  • the list of properties, including: name, data type, size, if the value is required or not, if it is an autoincrement
  • primary key
  • foreign keys
  • unique keys
  • check constraints
  • indexes
Parameters
nameThe name of the dataset we are looking information for.
Exceptions
ExceptionAn exception can be thrown, if the information about the dataset could not be retrieved.
Returns
The dataset schema.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

te::da::DataSource* te::gpkg::Transactor::getDataSource ( ) const
virtual

It returns the parent data source of the transactor.

Implements te::da::DataSourceTransactor.

te::common::CharEncoding te::gpkg::Transactor::getEncoding ( )
virtual

It return the DataSource current encoding.

Returns
The DataSource current encoding.

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::gm::Envelope> te::gpkg::Transactor::getExtent ( const std::string &  datasetName,
const std::string &  propertyName 
)
virtual

It retrieves the bounding rectangle of the spatial property for the given dataset.

Parameters
datasetNameThe dataset name.
propertyNameThe spatial property name.
Exceptions
ExceptionAn exception can be thrown, if the extent of the geometry property could not be retrieved.
Returns
The spatial property bounding rectangle, or NULL, if none can be retrieved.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::gm::Envelope> te::gpkg::Transactor::getExtent ( const std::string &  datasetName,
std::size_t  propertyPos 
)
virtual

It retrieves the bounding rectangle for the spatial property lying in the given position in the dataset.

Parameters
datasetNameThe dataset name.
propertyPosThe spatial property position.
Exceptions
ExceptionAn exception can be thrown, if the extent of the geometry property lying in the given position could not be retrieved.
Returns
The spatial property bounding rectangle, or NULL if none can be retrieved.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::ForeignKey> te::gpkg::Transactor::getForeignKey ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It retrieves the foreign key from the given dataset.

Parameters
datasetNameThe dataset name.
nameThe foreign key name.
Exceptions
ExceptionAn exception can be thrown, if the foreign key could not be retrieved.
Returns
If the foreign key exists in the dataset, it is returned; otherwise, a NULL is returned.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::vector<std::string> te::gpkg::Transactor::getForeignKeyNames ( const std::string &  datasetName)
virtual

It gets the foreign key names of the given dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the foreign key names could not be retrieved.
Returns
The foreign key names of the given dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::Index> te::gpkg::Transactor::getIndex ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It gets the index with the given name from the dataset.

Parameters
datasetNameThe dataset name.
nameThe index name.
Exceptions
ExceptionAn exception can be thrown, if the index could not be retrieved.
Returns
The index with the given name.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::vector<std::string> te::gpkg::Transactor::getIndexNames ( const std::string &  datasetName)
virtual

It gets the index names of the given dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the index names could not be retrieved.
Returns
The index names of the given dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

boost::int64_t te::gpkg::Transactor::getLastGeneratedId ( )
virtual

It returns the last id generated by an insertion command.

Returns
The last id generated by an insertion command.
Note
This is the way to deal with auto-increment values.
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::size_t te::gpkg::Transactor::getNumberOfDataSets ( )
virtual

It retrieves the number of data sets available in the data source.

Exceptions
ExceptionAn exception can be thrown, if the number of datasets could not be retrieved.
Returns
The number of data sets available in the data source.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::size_t te::gpkg::Transactor::getNumberOfItems ( const std::string &  datasetName)
virtual

It retrieves the number of items of the given dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the number of items of the dataset could not be retrieved.
Returns
The number of items of the given dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::size_t te::gpkg::Transactor::getNumberOfProperties ( const std::string &  datasetName)
virtual

It gets the number of properties of the given dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the number of dataset properties could not be retrieved.
Returns
The number of properties of the given dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::PreparedQuery> te::gpkg::Transactor::getPrepared ( const std::string &  qName = std::string(""))
virtual

It creates a prepared query object that may be used for query commands (select, insert, update and delete) that are used repeatedly.

Parameters
qNameThe prepared query name.
Exceptions
ExceptionAn exception can be thrown if the prepared query cannot be performed.
Returns
A prepared query object owned by the caller.

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::PrimaryKey> te::gpkg::Transactor::getPrimaryKey ( const std::string &  datasetName)
virtual

It retrieves the primary key of the dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the primary key could not be retrieved.
Returns
If a primary key exists in the dataset, it is returned; otherwise, a NULL is returned.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

boost::ptr_vector<te::dt::Property> te::gpkg::Transactor::getProperties ( const std::string &  datasetName)
virtual

It retrieves the properties of the dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the dataset properties could not be retrieved.
Returns
The properties of the dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::dt::Property> te::gpkg::Transactor::getProperty ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It retrieves the property with the given name from the dataset.

Parameters
datasetNameThe dataset name.
propertyNameThe property name.
Exceptions
ExceptionAn exception can be thrown, if the dataset property could not be retrieved.
Returns
The property with the given name from the dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::dt::Property> te::gpkg::Transactor::getProperty ( const std::string &  datasetName,
std::size_t  propertyPos 
)
virtual

It retrieves the property lying in the given position from the dataset.

Parameters
datasetNameThe dataset name.
propertyPosThe property position.
Exceptions
ExceptionAn exception can be thrown, if the property lying in the given position could not be retrieved.
Returns
The property in the given position.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::vector<std::string> te::gpkg::Transactor::getPropertyNames ( const std::string &  datasetName)
virtual

It gets the property names of the given dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the property names of the dataset could not be retrieved.
Returns
The property names of the dataset.
Note
Each dataset in the data source must have a unique name. For example, in a DBMS the name may contain the schema name before the table name separated by a dot notation (".").
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::Sequence> te::gpkg::Transactor::getSequence ( const std::string &  name)
virtual

It gets the sequence with the given name in the data source.

Parameters
nameThe sequence name.
Exceptions
ExceptionAn exception can be thrown, if the sequence could not be retrieved from the data source.
Returns
The sequence with the given name.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::vector<std::string> te::gpkg::Transactor::getSequenceNames ( )
virtual

It gets the sequence names available in the data source.

Note
Each sequence in the data source must have a unique name. For example, in a DBMS the name may contain the schema name before the sequence name separated by a dot notation (".").
Exceptions
ExceptionAn exception can be thrown, if the sequence names could not be retrieved.
Returns
The sequence names of the data source.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::UniqueKey> te::gpkg::Transactor::getUniqueKey ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It gets the unique key in the dataset with the given name.

Parameters
datasetNameThe dataset name.
nameThe unique key name.
Exceptions
ExceptionAn exception can be thrown, if the unique key could not be retrieved.
Returns
The unique key with the given name in the dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::vector<std::string> te::gpkg::Transactor::getUniqueKeyNames ( const std::string &  datasetName)
virtual

It gets the unique key names of the given dataset.

Parameters
datasetNameThe dataset name.
Exceptions
ExceptionAn exception can be thrown, if the unique key names could not be obtained.
Returns
The unique key names of the dataset.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::hasDataSets ( )
virtual

It checks if the data source has any dataset.

Exceptions
ExceptionAn exception can be thrown, if it is not possible to check if the data source has datasets .
Returns
True, if the data source has datasets; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::indexExists ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It checks if an index with the given name exists in the dataset.

Parameters
datasetNameThe dataset name.
nameThe index name.
Exceptions
ExceptionAn exception can be thrown, if the index existence could not be determined.
Returns
True, if the index exists in the dataset; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

virtual bool te::da::DataSourceTransactor::isDataSetNameValid ( const std::string &  datasetName)
virtualinherited

It returns true if the given string is a valid dataset name.

Parameters
datasetNameA dataset name whose validity will be checked.
Returns
True, if the name is valid according to the data source rules.
Note
Not thread-safe!

Reimplemented in terralib4::Transactor, te::stmem::Transactor, te::wms::Transactor, te::wcs::Transactor, te::mem::Transactor, te::wfs::Transactor, and te::sqlite::DataSourceTransactor.

bool te::gpkg::Transactor::isInTransaction ( ) const
virtual

It returns true if a transaction is in progress, otherwise, it returns false.

Returns
True, if a transaction is in progress, otherwise, false.

Implements te::da::DataSourceTransactor.

virtual bool te::da::DataSourceTransactor::isPropertyNameValid ( const std::string &  propertyName)
virtualinherited

It checks if the given property name is valid.

Parameters
propertyNameA property name whose validity will be checked.
Returns
True, if the name is valid according to the data source rules.
Note
Not thread-safe!

Reimplemented in terralib4::Transactor, te::stmem::Transactor, te::wms::Transactor, te::wcs::Transactor, te::mem::Transactor, te::wfs::Transactor, and te::sqlite::DataSourceTransactor.

void te::gpkg::Transactor::optimize ( const std::map< std::string, std::string > &  opInfo)
virtual

For some data access drivers, this method will perform some operations to optimize the data storage.

This is can be a typical maintenance command in database systems (like vacuum).

Parameters
opInfoAny information needed by the underlying driver in order to fine tune the optimization.
Exceptions
ExceptionIt may throw an exception if something goes wrong.
Note
Not thread-safe!
For some systems you must assure that no other thread are executing commands against the data source.
For some drivers, this method has no effect.

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::primaryKeyExists ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It checks if a primary key exists in the dataset.

Parameters
datasetNameThe dataset name.
nameThe primary key name.
Exceptions
ExceptionAn exception can be thrown, if the existence of the primary key could not be determined.
Returns
True, if a primary key exists in the dataset; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::propertyExists ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It checks if a property with the given name exists in the dataset.

Parameters
datasetNameThe dataset name.
nameThe property name.
Exceptions
ExceptionAn exception can be thrown, if the existence of the dataset property could not be obtained.
Returns
True, if the property exists in the dataset; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSet> te::gpkg::Transactor::query ( const te::da::Select q,
te::common::TraverseType  travType = te::common::FORWARDONLY,
bool  connected = false,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
)
virtual

It executes a query that may return some data using a generic query. 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. This method is different of the method that accepts a dataset name and a spatial filter, because it allows the retrieving of only a subset of the attributes, since a query can include a property list.

Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during the data retrieval
  • if the data source driver doesn't support the traversal type
Parameters
qA valid query object.
travTypeThe traverse type associated to the returned dataset.
connectedA flag to indicate if the returned dataset is connected or not.
accessPolicyAccess policy.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

std::auto_ptr<te::da::DataSet> te::gpkg::Transactor::query ( const std::string &  query,
te::common::TraverseType  travType = te::common::FORWARDONLY,
bool  connected = false,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
)
virtual

It executes a query that may return some data using the data source native language. 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.

Parameters
queryA query string in the data source native language.
travTypeThe traverse type associated to the returned dataset.
connectedA flag to indicate if the returned dataset is connected or not.
accessPolicyAccess policy.
Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during the data retrieval
  • if the data source driver doesn't support the traversal type
Note
Don't use this method, if you want portability for your application.
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::remove ( const std::string &  datasetName,
const te::da::ObjectIdSet oids = 0 
)
virtual

It removes all the informed items from the dataset.

It removes all the data items from a dataset which are identified by a set of object identifiers. If this set is not informed, all items will be removed.

Parameters
datasetNameThe dataset name.
oidsA list of object identifiers used to remove data from the datasource, or NULL for all.
Exceptions
ExceptionAn exception can be thrown, if the data items could not be removed.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::renameDataSet ( const std::string &  name,
const std::string &  newName 
)
virtual

It renames a dataset.

Parameters
nameThe name of the dataset to be renamed.
newNameThe new dataset name.
Exceptions
ExceptionAn exception can be thrown, if the dataset could not be renamed.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::renameProperty ( const std::string &  datasetName,
const std::string &  propertyName,
const std::string &  newPropertyName 
)
virtual

It renames a property of the given dataset.

Parameters
datasetNameThe dataset containig the property to be renamed.
propertyNameThe property to be renamed from the dataset.
newPropertyNameThe new property name.
Exceptions
ExceptionAn exception can be thrown, if the dataset property could not be renamed.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::rollBack ( )
virtual

It aborts the transaction. Any changes will be rolled-back.

After commiting or rolling back, you can start another transaction.

Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::sequenceExists ( const std::string &  name)
virtual

It checks if a sequence with the given name exists in the data source.

Parameters
nameThe sequence name.
Exceptions
ExceptionAn exception can be thrown, if the index existence could not be determined.
Returns
True, if the sequence exists in the data source; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

bool te::gpkg::Transactor::uniqueKeyExists ( const std::string &  datasetName,
const std::string &  name 
)
virtual

It checks if a unique key with the given name exists in the dataset.

Parameters
datasetNameThe dataset name.
nameThe unique key name.
Exceptions
ExceptionAn exception can be thrown, if the existence of the unique key could not be determined.
Returns
True, if the unique key exists in the data source; otherwise, it returns false.
Note
Not thread-safe!

Implements te::da::DataSourceTransactor.

void te::gpkg::Transactor::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 
)
virtual

It updates the contents of a dataset for the set of data items.

Parameters
datasetNameThe target dataset name.
datasetThe list of data items to be updated.
propertiesThe list of properties of the dataset to be updated.
oidsThe list of objects to be updated.
optionsA list of optional modifiers. It is driver specific.
limitThe number of items to be used from the input dataset. If set to 0 (default) all items are used.
Exceptions
ExceptionAn exception can be thrown, if the dataset could not be updated.
Note
The dataset reading will start in the current position. So, keep in mind that it is the caller responsability to inform the right position(and a valid one) for the dataset 'd', to start the updating process.
Not thread-safe!

Implements te::da::DataSourceTransactor.

virtual void te::gpkg::Transactor::update ( const std::string &  datasetName,
te::da::DataSet dataset,
const std::vector< std::set< int > > &  properties,
const std::vector< size_t > &  ids 
)
virtual

It updates the contents of a dataset.

All rows are edited. The third parameter tells wich columns are edited for each row.

Parameters
datasetNameName pf the dataset.
datasetDataset with editions.
propertiesColumns edited for each row. Note that the size of properties must be the same of the dataset.
idsList of positions of the columns that identifies rows.
Exceptions
te::da::ExceptionAn exception can be thrown, if the dataset could not be updated.

Reimplemented from te::da::DataSourceTransactor.

Member Data Documentation

long int te::gpkg::Transactor::m_fid
protected

Definition at line 244 of file Transactor.h.

DataSource* te::gpkg::Transactor::m_ogrDs
protected

Definition at line 243 of file Transactor.h.


The documentation for this class was generated from the following file: