Nebula
Loading...
Searching...
No Matches
sqlite3dataset.h
Go to the documentation of this file.
1#pragma once
2#ifndef DB_SQLITE3DATASET_H
3#define DB_SQLITE3DATASET_H
4//------------------------------------------------------------------------------
14#include "db/dataset.h"
15
16//------------------------------------------------------------------------------
17namespace Db
18{
19class Command;
20
21class Sqlite3Dataset : public Dataset
22{
24public:
28 virtual ~Sqlite3Dataset();
30 virtual void PerformQuery(bool appendResult=false);
32 virtual void CommitChanges(bool newRowsAsUpdate=false);
34 virtual void CommitDeletedRows();
35
36private:
38 virtual bool Connect();
40 virtual void Disconnect();
43
45
47 static const Util::String FromFrag;
48 static const Util::String CommaFrag;
49 static const Util::String WhereFrag;
50 static const Util::String StarFrag;
51 static const Util::String TickFrag;
52};
53
54} // namespace Db
55//------------------------------------------------------------------------------
56#endif
57
A dataset is an efficient in-memory-cache for rlational database data.
Definition dataset.h:43
SQLite implemention of Dataset.
Definition sqlite3dataset.h:22
static const Util::String WhereFrag
Definition sqlite3dataset.h:49
static const Util::String FromFrag
Definition sqlite3dataset.h:47
Ptr< Command > queryCommand
Definition sqlite3dataset.h:44
static const Util::String SelectFrag
Definition sqlite3dataset.h:46
__DeclareClass(Sqlite3Dataset)
virtual ~Sqlite3Dataset()
destructor
Definition sqlite3dataset.cc:38
virtual void CommitChanges(bool newRowsAsUpdate=false)
commit modified values to the database
Definition sqlite3dataset.cc:166
virtual void Disconnect()
disconnect from database
Definition sqlite3dataset.cc:75
static const Util::String TickFrag
Definition sqlite3dataset.h:51
virtual void PerformQuery(bool appendResult=false)
fill value table from database
Definition sqlite3dataset.cc:86
Sqlite3Dataset()
constructor
Definition sqlite3dataset.cc:30
virtual void CommitDeletedRows()
commit deleted rows only to the database
Definition sqlite3dataset.cc:179
static const Util::String CommaFrag
Definition sqlite3dataset.h:48
virtual bool Connect()
connect to database
Definition sqlite3dataset.cc:50
Util::String GetSqlSelectColumns() const
return SQL string fragment with selected columns
Definition sqlite3dataset.cc:194
static const Util::String StarFrag
Definition sqlite3dataset.h:50
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition column.cc:10
Nebula's universal string class.
Definition string.h:50