Nebula
Loading...
Searching...
No Matches
Db::Sqlite3Dataset Class Reference

#include <sqlite3dataset.h>

Detailed Description

SQLite implemention of Dataset.

Inherits Db::Dataset.

Public Member Functions

 Sqlite3Dataset ()
 constructor
 
virtual ~Sqlite3Dataset ()
 destructor
 
virtual void PerformQuery (bool appendResult=false)
 fill value table from database
 
virtual void CommitChanges (bool newRowsAsUpdate=false)
 commit modified values to the database
 
virtual void CommitDeletedRows ()
 commit deleted rows only to the database
 
- Public Member Functions inherited from Db::Dataset
 Dataset ()
 constructor
 
virtual ~Dataset ()
 destructor
 
void AddColumn (const Attr::AttrId &attrId)
 add the columns you're interested in
 
void AddAllTableColumns ()
 add all the table columns to the dataset
 
const Ptr< Table > & GetTable () const
 get pointer to database table this set is associated with
 
const Ptr< FilterSet > & Filter ()
 access to query filter
 
const Ptr< ValueTable > & Values ()
 access to value table
 
- Public Member Functions inherited from Core::RefCounted
 RefCounted ()
 constructor
 
int GetRefCount () const
 get the current refcount
 
void AddRef ()
 increment refcount by one
 
void Release ()
 decrement refcount and destroy object if refcount is zero
 
bool IsInstanceOf (const Rtti &rtti) const
 return true if this object is instance of given class
 
bool IsInstanceOf (const Util::String &className) const
 return true if this object is instance of given class by string
 
bool IsInstanceOf (const Util::FourCC &classFourCC) const
 return true if this object is instance of given class by fourcc
 
bool IsA (const Rtti &rtti) const
 return true if this object is instance of given class, or a derived class
 
bool IsA (const Util::String &rttiName) const
 return true if this object is instance of given class, or a derived class, by string
 
bool IsA (const Util::FourCC &rttiFourCC) const
 return true if this object is instance of given class, or a derived class, by fourcc
 
const Util::StringGetClassName () const
 get the class name
 
Util::FourCC GetClassFourCC () const
 get the class FourCC code
 

Private Member Functions

 __DeclareClass (Sqlite3Dataset)
 
virtual bool Connect ()
 connect to database
 
virtual void Disconnect ()
 disconnect from database
 
Util::String GetSqlSelectColumns () const
 return SQL string fragment with selected columns
 

Private Attributes

Ptr< CommandqueryCommand
 

Static Private Attributes

static const Util::String SelectFrag
 
static const Util::String FromFrag
 
static const Util::String CommaFrag
 
static const Util::String WhereFrag
 
static const Util::String StarFrag
 
static const Util::String TickFrag
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::RefCounted
static void DumpRefCountingLeaks ()
 dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!)
 
- Protected Member Functions inherited from Db::Dataset
void SetTable (const Ptr< Table > &t)
 set pointer to database table
 
bool IsConnected () const
 return true if the dataset is connected
 
- Protected Member Functions inherited from Core::RefCounted
virtual ~RefCounted ()
 destructor (called when refcount reaches zero)
 
- Protected Attributes inherited from Db::Dataset
bool isConnected
 
Ptr< Tabletable
 
Ptr< FilterSetfilter
 
Ptr< ValueTablevalues
 

Constructor & Destructor Documentation

◆ Sqlite3Dataset()

Db::Sqlite3Dataset::Sqlite3Dataset ( )

constructor

◆ ~Sqlite3Dataset()

Db::Sqlite3Dataset::~Sqlite3Dataset ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Db::Sqlite3Dataset::__DeclareClass ( Sqlite3Dataset )
private

◆ CommitChanges()

void Db::Sqlite3Dataset::CommitChanges ( bool newRowsAsUpdate = false)
virtual

commit modified values to the database

Commits any changes in the value table into the database.

Reimplemented from Db::Dataset.

◆ CommitDeletedRows()

void Db::Sqlite3Dataset::CommitDeletedRows ( )
virtual

commit deleted rows only to the database

Immediately deletes rows from the database.

Reimplemented from Db::Dataset.

◆ Connect()

bool Db::Sqlite3Dataset::Connect ( )
privatevirtual

connect to database

Reimplemented from Db::Dataset.

◆ Disconnect()

void Db::Sqlite3Dataset::Disconnect ( )
privatevirtual

disconnect from database

Reimplemented from Db::Dataset.

◆ GetSqlSelectColumns()

String Db::Sqlite3Dataset::GetSqlSelectColumns ( ) const
private

return SQL string fragment with selected columns

Helper method which returns a SQL fragment string containing the columns to select.

In the simplest case this method just returns a "*". Otherwise the format "table.column" will be returned.

◆ PerformQuery()

void Db::Sqlite3Dataset::PerformQuery ( bool appendResult = false)
virtual

fill value table from database

Reimplemented from Db::Dataset.

Member Data Documentation

◆ CommaFrag

const Util::String Db::Sqlite3Dataset::CommaFrag
staticprivate

◆ FromFrag

const Util::String Db::Sqlite3Dataset::FromFrag
staticprivate

◆ queryCommand

Ptr<Command> Db::Sqlite3Dataset::queryCommand
private

◆ SelectFrag

const Util::String Db::Sqlite3Dataset::SelectFrag
staticprivate

◆ StarFrag

const Util::String Db::Sqlite3Dataset::StarFrag
staticprivate

◆ TickFrag

const Util::String Db::Sqlite3Dataset::TickFrag
staticprivate

◆ WhereFrag

const Util::String Db::Sqlite3Dataset::WhereFrag
staticprivate

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