GDAL

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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

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:

- ogremulatedtransaction.h
- ogremulatedtransaction.cpp

Generated for GDAL by 1.8.8.