ERUCES::TEQuery
#include <tequery.h>
The TEQuery class is a query class.
Inheritance
- Inherits ERUCES::TEObject
Public Types
enum LogicalConnection
| Value | Description |
|---|---|
And | Logical AND |
Or | Logical OR |
OperatorNode | Operator Node |
enum ComparisonOperator
| Value | Description |
|---|---|
Undef | Undefined |
Equal | Logical EQUALS |
NotEqual | Logical NOT EQUALS |
Less | Logical LESS THAN |
LessOrEqual | Logical LESS THAN or EQUALS |
Greater | Logical GREATER THAN |
GreaterOrEqual | Logical GREATER THAN or EQUALS |
Static Public Attributes
| Type | Name | Description |
|---|---|---|
| _TESTD string | CLASSNAME |
Private Attrib
| Type | Name | Description |
|---|---|---|
| void * | m_val | |
| PersistentObject * | m_pObjectImpl |
Private Func
| Member | Description |
|---|---|
TEQuery() | The TEQuery constructor is the default class constructor. |
Public Member Functions
| Member | Description |
|---|---|
TEQuery(LogicalConnection logical) | The TEQuery constructor constructs a logical query node. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const bool val) | The TEQuery constructor constructs a comparision node to a boolean. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const uint8_t val) | The TEQuery constructor constructs a comparision node to a unsigned 8-bit integer. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const uint16_t val) | The TEQuery constructor constructs a comparision node to a unsigned 16-bit integer. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const uint32_t val) | The TEQuery constructor constructs a comparision node to a unsigned 32-bit integer. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const int8_t val) | The TEQuery constructor constructs a comparision node to a 8-bit integer. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const int16_t val) | The TEQuery constructor constructs a comparision node to a 16-bit integer. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const int32_t val) | The TEQuery constructor constructs a comparision node to a 32-bit integer. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const _TESTD string &val) | The TEQuery constructor constructs a comparision node to a string. |
TEQuery(const TEQuery &) | The TEQuery constructor copies a TEQuery object. |
~TEQuery() | The TEQuery destructor is the class destructor. |
void addSubQuery(const TEQuery &subQuery) | The addSubQuery method adds a sub query. |
void orderBy(const _TESTD string &attributeName, bool ascending=true) | |
void setLimit(const uint64_t top, const uint64_t offset) | The setLimit method sets the result limit. |
const _TESTD string getClassName() const | The getClassName method retrieves the class name. |
TEObject * clone() const | The clone method clones a TEQuery object. |
Member Function Documentation
TEQuery()
The TEQuery constructor is the default class constructor.
TEQuery(LogicalConnection logical)
The TEQuery constructor constructs a logical query node.
Parameters
| Parameter | Description |
|---|---|
logical | A LogicalConnection object representing the query node. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const bool val)
The TEQuery constructor constructs a comparision node to a boolean.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | A boolean representing the value. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const uint8_t val)
The TEQuery constructor constructs a comparision node to a unsigned 8-bit integer.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | An 8-bit integer representing the value. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const uint16_t val)
The TEQuery constructor constructs a comparision node to a unsigned 16-bit integer.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | An 16-bit integer representing the value. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const uint32_t val)
The TEQuery constructor constructs a comparision node to a unsigned 32-bit integer.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | An 32-bit integer representing the value. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const int8_t val)
The TEQuery constructor constructs a comparision node to a 8-bit integer.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | An 8-bit integer representing the value. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const int16_t val)
The TEQuery constructor constructs a comparision node to a 16-bit integer.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | An 16-bit integer representing the value. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const int32_t val)
The TEQuery constructor constructs a comparision node to a 32-bit integer.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | An 32-bit integer representing the value. |
TEQuery(const _TESTD string &attributeName, ComparisonOperator op, const _TESTD string &val)
The TEQuery constructor constructs a comparision node to a string.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
op | A ComparisonOperator representing the operation. |
val | A string representing the value. |
TEQuery(const TEQuery &)
The TEQuery constructor copies a TEQuery object.
~TEQuery()
The TEQuery destructor is the class destructor.
void addSubQuery(const TEQuery &subQuery)
The addSubQuery method adds a sub query.
Parameters
| Parameter | Description |
|---|---|
subQuery | A TEQuery object. |
void orderBy(const _TESTD string &attributeName, bool ascending=true)
The orderBy method sets the result order. @param attributeName A string representing the attribute name. @param ascending A boolean representing whether or not to order ascending.
Remark: Only useful for root node
void setLimit(const uint64_t top, const uint64_t offset)
The setLimit method sets the result limit.
Parameters
| Parameter | Description |
|---|---|
top | An integer representing the top limit. |
offset | An integer representing the offset. |
Remark: Only useful for root node
const _TESTD string getClassName() const
The getClassName method retrieves the class name.
Returns: String of class name
TEObject * clone() const
The clone method clones a TEQuery object.
Returns: Cloned TEQuery object.