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

#include <sqlite3filterset.h>

Inherits Db::FilterSet.

Public Member Functions

virtual Util::String AsSqlWhere () const
 compile into an SQL WHERE statement
 
virtual void BindValuesToCommand (const Ptr< Command > &cmd, IndexT wildcardStartIndex)
 bind filter attribute values to command
 
- Public Member Functions inherited from Db::FilterSet
 FilterSet ()
 constructor
 
virtual ~FilterSet ()
 destructor
 
void Clear ()
 clear the filter
 
void ClearDirtyFlag ()
 clear the dirty state of the filter (every op on the filter will make it dirty)
 
bool IsDirty () const
 return true if the filter is dirty
 
bool IsEmpty () const
 return true if the filter is empty
 
void BeginBlock ()
 begin a new level in the condition tree (opens a bracket)
 
void EndBlock ()
 end the current level in the condition tree (close current bracket)
 
void AddEqualCheck (const Attr::Attribute &attr)
 add an equality check
 
void AddGreaterThenCheck (const Attr::Attribute &attr)
 add a greater check
 
void AddLessThenCheck (const Attr::Attribute &attr)
 add a lesser check
 
void AddGreaterOrEqualCheck (const Attr::Attribute &attr)
 add a greater-equals check
 
void AddLessOrEqualCheck (const Attr::Attribute &attr)
 add a lesser-equals check
 
void AddAnd ()
 add a boolean AND
 
void AddOr ()
 add a boolean OR
 
void AddNot ()
 add a boolean NOT
 
- 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 (Sqlite3FilterSet)
 
void RecurseBuildWhere (const Util::SimpleTree< Token >::Node *curNode, Util::String &inOutStr) const
 recursing build method for AsSqlWhere()
 

Static Private Attributes

static const Util::String OpenBracketFrag
 
static const Util::String CloseBracketFrag
 
static const Util::String AndFrag
 
static const Util::String OrFrag
 
static const Util::String NotFrag
 
static const Util::String DotFrag
 
static const Util::String EqualFrag
 
static const Util::String NotEqualFrag
 
static const Util::String GreaterFrag
 
static const Util::String LessFrag
 
static const Util::String GreaterEqualFrag
 
static const Util::String LessEqualFrag
 
static const Util::String WildcardFrag
 
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 Core::RefCounted
virtual ~RefCounted ()
 destructor (called when refcount reaches zero)
 
- Protected Attributes inherited from Db::FilterSet
Util::SimpleTree< Tokentokens
 
Util::SimpleTree< Token >::Node * curToken
 
Util::Array< Attr::AttributebindAttrs
 
bool isDirty
 

Member Function Documentation

◆ __DeclareClass()

Db::Sqlite3FilterSet::__DeclareClass ( Sqlite3FilterSet )
private

◆ AsSqlWhere()

String Db::Sqlite3FilterSet::AsSqlWhere ( ) const
virtual

compile into an SQL WHERE statement

This compiles the filter tree into an SQL WHERE statement.

Reimplemented from Db::FilterSet.

◆ BindValuesToCommand()

void Db::Sqlite3FilterSet::BindValuesToCommand ( const Ptr< Command > & cmd,
IndexT wildcardStartIndex )
virtual

bind filter attribute values to command

This methods binds the actual WHERE values to a compiled command.

Reimplemented from Db::FilterSet.

◆ RecurseBuildWhere()

void Db::Sqlite3FilterSet::RecurseBuildWhere ( const Util::SimpleTree< Token >::Node * curNode,
Util::String & inOutStr ) const
private

recursing build method for AsSqlWhere()

This method is recursively called to build an SQL WHERE statement from the current filter tree.

Member Data Documentation

◆ AndFrag

const Util::String Db::Sqlite3FilterSet::AndFrag
staticprivate

◆ CloseBracketFrag

const Util::String Db::Sqlite3FilterSet::CloseBracketFrag
staticprivate

◆ DotFrag

const Util::String Db::Sqlite3FilterSet::DotFrag
staticprivate

◆ EqualFrag

const Util::String Db::Sqlite3FilterSet::EqualFrag
staticprivate

◆ GreaterEqualFrag

const Util::String Db::Sqlite3FilterSet::GreaterEqualFrag
staticprivate

◆ GreaterFrag

const Util::String Db::Sqlite3FilterSet::GreaterFrag
staticprivate

◆ LessEqualFrag

const Util::String Db::Sqlite3FilterSet::LessEqualFrag
staticprivate

◆ LessFrag

const Util::String Db::Sqlite3FilterSet::LessFrag
staticprivate

◆ NotEqualFrag

const Util::String Db::Sqlite3FilterSet::NotEqualFrag
staticprivate

◆ NotFrag

const Util::String Db::Sqlite3FilterSet::NotFrag
staticprivate

◆ OpenBracketFrag

const Util::String Db::Sqlite3FilterSet::OpenBracketFrag
staticprivate

◆ OrFrag

const Util::String Db::Sqlite3FilterSet::OrFrag
staticprivate

◆ TickFrag

const Util::String Db::Sqlite3FilterSet::TickFrag
staticprivate

◆ WildcardFrag

const Util::String Db::Sqlite3FilterSet::WildcardFrag
staticprivate

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