GDAL
Public Member Functions | List of all members
IOGRTransactionBehaviour Class Referenceabstract

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

#include <ogremulatedtransaction.h>

Public Member Functions

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

Detailed Description

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

Since
GDAL 2.0

Member Function Documentation

◆ CommitTransaction()

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
poDSInOutdatasource handle that may be modified
bOutHasReopenedDSoutput boolean to indicate if datasource has been closed
Returns
OGRERR_NONE in case of success

◆ RollbackTransaction()

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
poDSInOutdatasource handle that may be modified
bOutHasReopenedDSoutput boolean to indicate if datasource has been closed
Returns
OGRERR_NONE in case of success

◆ StartTransaction()

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
poDSInOutdatasource handle that may be modified
bOutHasReopenedDSoutput 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.8.13.