Public Member Functions

IOGRTransactionBehaviour Class Reference

IOGRTransactionBehaviour is an interface that a driver must implement to provide emulation of transactions. More...

#include <ogremulatedtransaction.h>

List of all members.

Public Member Functions

virtual OGRErr StartTransaction (OGRDataSource *&poDSInOut, int &bOutHasReopenedDS)=0
 Start a transaction.
virtual OGRErr CommitTransaction (OGRDataSource *&poDSInOut, int &bOutHasReopenedDS)=0
 Commit a transaction.
virtual OGRErr RollbackTransaction (OGRDataSource *&poDSInOut, int &bOutHasReopenedDS)=0
 Rollback a transaction.

Detailed Description

IOGRTransactionBehaviour is an interface that a driver must implement to provide emulation of transactions.

Since:
GDAL 2.0

Member Function Documentation

virtual OGRErr IOGRTransactionBehaviour::CommitTransaction ( OGRDataSource *&  poDSInOut,
int &  bOutHasReopenedDS 
) [pure virtual]

Commit a transaction.

The implementation may update the poDSInOut reference by closing and reopening the datasource (or assigning it to NULL in case of error). In which case bOutHasReopenedDS must be set to TRUE.

The implementation can for example remove the backup it may have done at StartTransaction() time.

Parameters:
poDSInOut datasource handle that may be modified
bOutHasReopenedDS output boolean to indicate if datasource has been closed
Returns:
OGRERR_NONE in case of success
virtual OGRErr IOGRTransactionBehaviour::RollbackTransaction ( OGRDataSource *&  poDSInOut,
int &  bOutHasReopenedDS 
) [pure virtual]

Rollback a transaction.

The implementation may update the poDSInOut reference by closing and reopening the datasource (or assigning it to NULL in case of error). In which case bOutHasReopenedDS must be set to TRUE.

The implementation can for example restore the backup it may have done at StartTransaction() time.

Parameters:
poDSInOut datasource handle that may be modified
bOutHasReopenedDS output boolean to indicate if datasource has been closed
Returns:
OGRERR_NONE in case of success
virtual OGRErr IOGRTransactionBehaviour::StartTransaction ( OGRDataSource *&  poDSInOut,
int &  bOutHasReopenedDS 
) [pure virtual]

Start a transaction.

The implementation may update the poDSInOut reference by closing and reopening the datasource (or assigning it to NULL in case of error). In which case bOutHasReopenedDS must be set to TRUE.

The implementation can for example backup the existing files/directories that compose the current datasource.

Parameters:
poDSInOut datasource handle that may be modified
bOutHasReopenedDS output boolean to indicate if datasource has been closed
Returns:
OGRERR_NONE in case of success

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

Generated for GDAL by doxygen 1.7.1.