OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( )

Member Function Documentation

DatabasePtr Copy ( const String filename)

clone database

useful for saving an in-memory database to disk

sqlite3* Handle ( )
inline

Get SQLite handle.

Definition at line 163 of file sqlite_wrap.hh.

sqlite3_int64 LastRowID ( )
static DatabasePtr Open ( const String database)
static

open database

Returns
a valid database handle
Exceptions
DatabaseErrorif the database could not be opened.
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: