SEcube open-source SDK
Public Member Functions | Private Attributes | List of all members
statement Class Reference

Handy RAII wrapper for sqlite3_stmt which requires call to sqlite3_finalize to avoid resource leakage. See the SQLite documentation for more informations about sqlite3_stmt. More...

#include <SEkey.h>

Public Member Functions

 statement ()
 
 ~statement ()
 
sqlite3_stmt * getstmt ()
 
sqlite3_stmt ** getstmtref ()
 
void finalize ()
 

Private Attributes

sqlite3_stmt * stmt
 

Detailed Description

Handy RAII wrapper for sqlite3_stmt which requires call to sqlite3_finalize to avoid resource leakage. See the SQLite documentation for more informations about sqlite3_stmt.

Constructor & Destructor Documentation

◆ statement()

statement::statement ( )
inline

The constructor will set the statement pointer to NULL, the statement will then be allocated by an explicit call to sqlite3_prepare().

◆ ~statement()

statement::~statement ( )
inline

Destructor involving sqlite3_finalize() to avoid memory leaks.

Member Function Documentation

◆ finalize()

void statement::finalize ( )
inline

Wrapper for sqlite3_finalize() SQLite API.

◆ getstmt()

sqlite3_stmt* statement::getstmt ( )
inline

Returns the pointer to the SQLite statement.

◆ getstmtref()

sqlite3_stmt** statement::getstmtref ( )
inline

Returns the pointer to the pointer of the SQLite statement, implies finalization of previous pointer if not NULL (used for cyclig usage of same statement object).

Member Data Documentation

◆ stmt

sqlite3_stmt* statement::stmt
private

Pointer to the statement as required by SQLite.


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