version 1.1.2.4, 2001/12/09 02:57:09
|
version 1.1.2.5, 2001/12/12 17:45:53
|
|
|
WHERE <where clause> | WHERE <where clause> |
</pre> | </pre> |
| |
The properties are obtained with the getProperties() method. The class |
There are methods for obtaining the various elements of the select |
name is obtained with getClassName(). The where clause is evaluated by |
statement. |
calling evaluateWhereClause() with the appropriate arguments. If |
|
hasWhereClause() returns false, then there is no where clause. |
|
| |
The components of the where clause are stored in two arrays: one for | The components of the where clause are stored in two arrays: one for |
operands and one for operators (these are placed in proper order by the | operands and one for operators (these are placed in proper order by the |
|
|
/** Returns the number of property names which were indicated in the | /** Returns the number of property names which were indicated in the |
selection list. | selection list. |
*/ | */ |
Uint32 getPropertyNameCount() const |
Uint32 getSelectPropertyNameCount() const |
{ | { |
return _propertyNames.size(); |
return _selectPropertyNames.size(); |
} | } |
| |
/** Gets the i-th property name in the list. |
/** Gets the i-th selected property name in the list. |
*/ | */ |
const String& getPropertyName(Uint32 i) |
const String& getSelectPropertyName(Uint32 i) |
{ | { |
return _propertyNames[i]; |
return _selectPropertyNames[i]; |
} | } |
| |
/** Appends a property name to the property name list. This user should | /** Appends a property name to the property name list. This user should |
not call this method; it should only be called by the parser. | not call this method; it should only be called by the parser. |
*/ | */ |
void appendPropertyName(const String& x) |
void appendSelectPropertyName(const String& x) |
{ | { |
_propertyNames.append(x); |
_selectPropertyNames.append(x); |
} | } |
| |
|
/** Returns the number of unique property names from the where clause. |
|
*/ |
|
Uint32 getWherePropertyNameCount() const |
|
{ |
|
return _wherePropertyNames.size(); |
|
} |
|
|
|
/** Gets the i-th unique property appearing in the where clause. |
|
*/ |
|
const String& getWherePropertyName(Uint32 i) |
|
{ |
|
return _wherePropertyNames[i]; |
|
} |
|
|
|
/** Appends a property name to the where property name list. This user |
|
should not call this method; it should only be called by the parser. |
|
|
|
@param x name of the property. |
|
@return false if a property with that name already exists. |
|
*/ |
|
Boolean appendWherePropertyName(const String& x); |
|
|
/** Appends an operation to the operation array. This method should only | /** Appends an operation to the operation array. This method should only |
be called by the parser itself. | be called by the parser itself. |
*/ | */ |
|
|
// WHERE ... | // WHERE ... |
// | // |
| |
Array<String> _propertyNames; |
Array<String> _selectPropertyNames; |
|
|
|
// |
|
// The unique list of property names appearing in the WHERE clause. |
|
// Although a property may occur many times in the WHERE clause, it will |
|
// only appear once in this list. |
|
// |
|
|
|
Array<String> _wherePropertyNames; |
| |
// | // |
// The list of operations encountered while parsing the WHERE clause. | // The list of operations encountered while parsing the WHERE clause. |
|
|
// | // |
| |
Array<WQLOperand> _operands; | Array<WQLOperand> _operands; |
|
|
|
void f() const { } |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |