2#ifndef DB_SQLITE3DATABASE_H
3#define DB_SQLITE3DATABASE_H
16#include "db/database.h"
#define DeclareString(NAME, FOURCC, ACCESSMODE)
Definition attributedefinition.h:94
#define DeclareBool(NAME, FOURCC, ACCESSMODE)
Definition attributedefinition.h:78
#define DeclareBlob(NAME, FOURCC, ACCESSMODE)
Definition attributedefinition.h:106
#define DeclareInt(NAME, FOURCC, ACCESSMODE)
Definition attributedefinition.h:54
Wraps an entire database into a C++ object.
Definition database.h:30
IO::URI uri
Definition database.h:106
bool IsOpen() const
return true if database is open
Definition database.h:154
SQLite3 implementation of Db::Database.
Definition sqlite3database.h:38
sqlite3 * sqliteHandle
Definition sqlite3database.h:100
virtual void EndTransaction()
end a transaction on the database
Definition sqlite3database.cc:249
virtual void Close()
close the database
Definition sqlite3database.cc:206
TempStore
temporary storage location
Definition sqlite3database.h:43
@ File
Definition sqlite3database.h:44
@ Memory
Definition sqlite3database.h:45
virtual ~Sqlite3Database()
destructor
Definition sqlite3database.cc:52
int busyTimeout
Definition sqlite3database.h:99
Sqlite3Database()
constructor
Definition sqlite3database.cc:39
Ptr< Command > endTransactionCmd
Definition sqlite3database.h:102
TempStore tempStore
Definition sqlite3database.h:97
virtual void DetachDatabase(const Util::String &dbName)
detach an attached database
Definition sqlite3database.cc:392
Ptr< Command > beginTransactionCmd
Definition sqlite3database.h:101
int GetBusyTimeout() const
get busy timeout in milliseconds
Definition sqlite3database.h:184
void SetCacheNumPages(SizeT numCachePages)
set the SQLite3 database cache size in number of pages
Definition sqlite3database.h:119
SizeT GetCacheNumPages() const
get SQLite3 database cache size
Definition sqlite3database.h:130
bool GetSynchronousMode() const
get synchronous mode
Definition sqlite3database.h:166
void RegisterAttributes(Ptr< Table > &attrTable)
dynamically register attributes from special _Attributes db table
Definition sqlite3database.cc:269
void SetSynchronousMode(bool b)
synchronous mode on/off
Definition sqlite3database.h:157
SizeT cacheNumPages
Definition sqlite3database.h:96
__DeclareClass(Sqlite3Database)
virtual void BeginTransaction()
begin a transaction on the database
Definition sqlite3database.cc:234
void ReadTableLayouts()
read table layouts from database
Definition sqlite3database.cc:307
void SetTempStore(TempStore s)
set temporary storage location
Definition sqlite3database.h:139
sqlite3 * GetSqliteHandle() const
get the SQLite database handle
Definition sqlite3database.h:109
virtual bool Open()
open the database
Definition sqlite3database.cc:64
virtual void CopyInMemoryDatabaseToFile(const IO::URI &fileUri)
copy in memory database to file
Definition sqlite3database.cc:411
TempStore GetTempStore() const
get temporary storage location
Definition sqlite3database.h:148
virtual bool AttachDatabase(const IO::URI &uri, const Util::String &dbName)
attach another database to the current database
Definition sqlite3database.cc:355
void SetBusyTimeout(int ms)
set busy timeout in milliseconds (default is 100, 0 disabled busy handling)
Definition sqlite3database.h:175
bool syncMode
Definition sqlite3database.h:98
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
#define n_assert(exp)
Definition debug.h:50
Nebula compiler specific defines and configuration.
Definition accessmode.h:13
@ ReadOnly
Definition accessmode.h:16
Nebula's universal string class.
Definition string.h:50
int SizeT
Definition types.h:49