hamsterdb Embedded Database  2.1.7
Public Member Functions | Protected Attributes
hamsterdb::txn Class Reference

#include <hamsterdb.hpp>

Public Member Functions

 txn (ham_txn_t *t=0)
 
void abort ()
 
void commit ()
 
std::string get_name ()
 
ham_txn_tget_handle ()
 

Protected Attributes

ham_txn_tm_txn
 

Detailed Description

A Transaction class

This class wraps structures of type ham_txn_t.

Definition at line 235 of file hamsterdb.hpp.

Constructor & Destructor Documentation

hamsterdb::txn::txn ( ham_txn_t t = 0)
inline

Constructor

Definition at line 238 of file hamsterdb.hpp.

Member Function Documentation

void hamsterdb::txn::abort ( )
inline

Abort the Transaction

Definition at line 243 of file hamsterdb.hpp.

References error(), ham_txn_abort(), and m_txn.

void hamsterdb::txn::commit ( )
inline

Commit the Transaction

Definition at line 250 of file hamsterdb.hpp.

References error(), ham_txn_commit(), and m_txn.

ham_txn_t* hamsterdb::txn::get_handle ( )
inline

Returns a pointer to the internal ham_txn_t structure.

Definition at line 262 of file hamsterdb.hpp.

References m_txn.

Referenced by hamsterdb::db::erase(), hamsterdb::db::find(), and hamsterdb::db::insert().

std::string hamsterdb::txn::get_name ( )
inline

Definition at line 256 of file hamsterdb.hpp.

References ham_txn_get_name(), and m_txn.

Field Documentation

ham_txn_t* hamsterdb::txn::m_txn
protected

Definition at line 267 of file hamsterdb.hpp.

Referenced by abort(), commit(), get_handle(), and get_name().


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