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 (GDALDataset *&poDSInOut, int &bOutHasReopenedDS)=0
| Start a transaction.
virtual OGRErr | CommitTransaction (GDALDataset *&poDSInOut, int &bOutHasReopenedDS)=0
| Commit a transaction.
virtual OGRErr | RollbackTransaction (GDALDataset *&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

## ◆ CommitTransaction()

virtual OGRErr IOGRTransactionBehaviour::CommitTransaction | ( | GDALDataset *& | 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

## ◆ RollbackTransaction()

virtual OGRErr IOGRTransactionBehaviour::RollbackTransaction | ( | GDALDataset *& | 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

## ◆ StartTransaction()

virtual OGRErr IOGRTransactionBehaviour::StartTransaction | ( | GDALDataset *& | 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