OpenStructure
Public Member Functions | Static Public Member Functions
Database Class Reference

#include <sqlite_wrap.hh>

Public Member Functions

 ~Database ()
 
PreparedStatementPtr Prepare (const String &query)
 
sqlite3 * Handle ()
 
sqlite3_int64 LastRowID ()
 
DatabasePtr Copy (const String &filename)
 

Static Public Member Functions

static DatabasePtr Open (const String &database)
 

Detailed Description

SQLite database handle.

Definition at line 148 of file sqlite_wrap.hh.

Constructor & Destructor Documentation

◆ ~Database()

~Database ( )

Member Function Documentation

◆ Copy()

DatabasePtr Copy ( const String filename)

clone database

useful for saving an in-memory database to disk

◆ Handle()

sqlite3* Handle ( )
inline

Get SQLite handle.

Definition at line 163 of file sqlite_wrap.hh.

◆ LastRowID()

sqlite3_int64 LastRowID ( )

◆ Open()

static DatabasePtr Open ( const String database)
static

open database

Returns
a valid database handle
Exceptions
DatabaseErrorif the database could not be opened.

◆ Prepare()

PreparedStatementPtr Prepare ( const String query)

prepare statement for execution

Exceptions
DatabaseErrorif the statement could not be prepared.
Note
execution of multiple statemens is not supported.

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