#include <OWBI1_WQLOperand.hpp>
Collaboration diagram for OWBI1::WQLOperand:
Public Types | |
enum | Type { NULL_VALUE, INTEGER_VALUE, DOUBLE_VALUE, BOOLEAN_VALUE, STRING_VALUE, PROPERTY_NAME } |
Defines allowed types of WQL operands (NULL_VALUE, INTEGER_VALUE, DOUBLE_VALUE, BOOLEAN_VALUE, STRING_VALUE, PROPERTY_NAME). More... | |
Public Member Functions | |
WQLOperand () | |
Desfault constructor. | |
WQLOperand (Int64 x, WQLIntegerValueTag) | |
Initializes object as INTEGER_VALUE. | |
WQLOperand (Real64 x, WQLDoubleValueTag) | |
Initializes object as DOUBLE_VALUE. | |
WQLOperand (bool x, WQLBoolValueTag) | |
Initializes object as BOOLEAN_VALUE. | |
WQLOperand (const String &x, WQLStringValueTag) | |
Initializes object as STRING_VALUE. | |
WQLOperand (const String &x, WQLPropertyNameTag) | |
Initializes object as PROPERTY_NAME. | |
Type | getType () const |
Accessor for getting the type of the operand. | |
void | setIntegerValue (Int32 x) |
Sets this object to an INTEGER_VALUE. | |
void | setDoubleValue (Real64 x) |
Sets this object to an DOUBLE_VALUE. | |
void | setBoolValue (bool x) |
Sets this object to a BOOLEAN_VALUE. | |
void | setStringValue (const String &x) |
Sets this object to a STRING_VALUE. | |
void | setPropertyName (const String &x) |
Sets this object to a PROPERTY_NAME. | |
Int64 | getIntegerValue () const |
Gets this object as an INTEGER_VALUE. | |
Real64 | getDoubleValue () const |
Gets this object as an DOUBLE_VALUE. | |
bool | getBooleanValue () const |
Gets this object as an BOOLEAN_VALUE. | |
const String & | getStringValue () const |
Gets this object as a STRING_VALUE. | |
const String & | getPropertyName () const |
Gets this object as a PROPERTY_NAME. | |
String | toString () const |
Converts this object to a string for output purposes. | |
Private Attributes | |
String | _string |
Type | _type |
Int64 | _integerValue |
Real64 | _doubleValue |
bool | _booleanValue |
Instances of WQLOperand are used to represent the operands of the SQL where clause. Instances of this class are created while parsing a SQL where clause and added to the WQLSelectStatement by calling the WQLSelectStatement::appendOperand() method. Consider the following example:
SELECT ratio, size, name, str FROM MyClass WHERE ratio > 1.4 AND size = 3 AND name = "Hello" AND str IS NULLIn this example, the following are operands:
ratio 1.4 size 3 name "Hello" strOperands are of one of the following types:
Definition at line 106 of file OWBI1_WQLOperand.hpp.
|
Defines allowed types of WQL operands (NULL_VALUE, INTEGER_VALUE, DOUBLE_VALUE, BOOLEAN_VALUE, STRING_VALUE, PROPERTY_NAME).
Definition at line 112 of file OWBI1_WQLOperand.hpp. |
|
Desfault constructor. Initializes to null value. Definition at line 123 of file OWBI1_WQLOperand.hpp. |
|
Initializes object as INTEGER_VALUE.
Definition at line 129 of file OWBI1_WQLOperand.hpp. |
|
Initializes object as DOUBLE_VALUE.
Definition at line 136 of file OWBI1_WQLOperand.hpp. |
|
Initializes object as BOOLEAN_VALUE.
Definition at line 143 of file OWBI1_WQLOperand.hpp. |
|
Initializes object as STRING_VALUE.
Definition at line 150 of file OWBI1_WQLOperand.hpp. |
|
Initializes object as PROPERTY_NAME.
Definition at line 157 of file OWBI1_WQLOperand.hpp. |
|
Gets this object as an BOOLEAN_VALUE.
Definition at line 220 of file OWBI1_WQLOperand.hpp. References OWBI1_THROW. Referenced by OWBI1::WQLSelectStatement::evaluateWhereClause(). |
|
Gets this object as an DOUBLE_VALUE.
Definition at line 211 of file OWBI1_WQLOperand.hpp. References OWBI1_THROW. |
|
Gets this object as an INTEGER_VALUE.
Definition at line 202 of file OWBI1_WQLOperand.hpp. References OWBI1_THROW. |
|
Gets this object as a PROPERTY_NAME.
Definition at line 238 of file OWBI1_WQLOperand.hpp. References OWBI1_THROW. Referenced by OWBI1::_ResolveProperty(), OWBI1::WQLCompile::_ResolveProperty(), and OWBI1::WQLSelectStatement::evaluateWhereClause(). |
|
Gets this object as a STRING_VALUE.
Definition at line 229 of file OWBI1_WQLOperand.hpp. References OWBI1_THROW. |
|
Accessor for getting the type of the operand.
Definition at line 164 of file OWBI1_WQLOperand.hpp. Referenced by OWBI1::_Evaluate(), OWBI1::_ResolveProperty(), OWBI1::WQLCompile::_ResolveProperty(), OWBI1::WQLSelectStatement::evaluateWhereClause(), and OWBI1::operator==(). |
|
Sets this object to a BOOLEAN_VALUE.
Definition at line 181 of file OWBI1_WQLOperand.hpp. |
|
Sets this object to an DOUBLE_VALUE.
Definition at line 174 of file OWBI1_WQLOperand.hpp. |
|
Sets this object to an INTEGER_VALUE.
Definition at line 167 of file OWBI1_WQLOperand.hpp. |
|
Sets this object to a PROPERTY_NAME.
Definition at line 195 of file OWBI1_WQLOperand.hpp. |
|
Sets this object to a STRING_VALUE.
Definition at line 188 of file OWBI1_WQLOperand.hpp. |
|
Converts this object to a string for output purposes.
Definition at line 40 of file OWBI1_WQLOperand.cpp. References _booleanValue, _doubleValue, _integerValue, _string, _type, BOOLEAN_VALUE, DOUBLE_VALUE, INTEGER_VALUE, PROPERTY_NAME, result, and STRING_VALUE. |
|
Definition at line 252 of file OWBI1_WQLOperand.hpp. Referenced by toString(). |
|
Definition at line 251 of file OWBI1_WQLOperand.hpp. Referenced by toString(). |
|
Definition at line 250 of file OWBI1_WQLOperand.hpp. Referenced by toString(). |
|
Definition at line 254 of file OWBI1_WQLOperand.hpp. Referenced by toString(). |
|
Definition at line 255 of file OWBI1_WQLOperand.hpp. Referenced by toString(). |