scclib-sqlite
Stable Cloud Computing Sqlite Library
Public Member Functions | List of all members
scc::sqld::Trans Class Reference

Database transaction. More...

#include <sqld.h>

Public Member Functions

 Trans (Conn &)
 
void begin ()
 BEGIN the transaction. More...
 
void commit ()
 COMMIT the transaction. More...
 
void abort ()
 ROLLBACK (abort) the transaction. More...
 
bool is_active () const
 Is this transaction active?
 

Detailed Description

Database transaction.

An active transaction will be aborted when the object is destroyed.

Examples
unittest/sqld.cc.

Definition at line 89 of file sqld.h.

Member Function Documentation

◆ abort()

void Trans::abort ( )

ROLLBACK (abort) the transaction.

Throws an exception if the transaction is not active.

Definition at line 116 of file sqld.cc.

◆ begin()

void Trans::begin ( )

BEGIN the transaction.

Throws an exception if the transaction is already active.

Definition at line 92 of file sqld.cc.

◆ commit()

void Trans::commit ( )

COMMIT the transaction.

Throws an exception if the transaction is not active.

Definition at line 104 of file sqld.cc.


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