(file) Return to WQLSelectStatement.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / WQL

Diff for /pegasus/src/Pegasus/WQL/WQLSelectStatement.h between version 1.1.2.1 and 1.1.2.5

version 1.1.2.1, 2001/12/02 20:36:49 version 1.1.2.5, 2001/12/12 17:45:53
Line 33 
Line 33 
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/CIMInstance.h>  
 #include <Pegasus/WQL/WQLOperation.h> #include <Pegasus/WQL/WQLOperation.h>
 #include <Pegasus/WQL/WQLOperand.h> #include <Pegasus/WQL/WQLOperand.h>
   #include <Pegasus/WQL/WQLPropertySource.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 /** This class represents a compiled WBEMSQl1 select statement.  /** This class represents a compiled WQL1 select statement.
  
     An instance of WQLSelectStatement is passed to WQLParser::parse() which     An instance of WQLSelectStatement is passed to WQLParser::parse() which
     parses and WBEMSQL1 SELECT statement and initializes the WQLSelectStatement      parses the WQL1 SELECT statement and initializes the WQLSelectStatement
     instance. The WBEMSWL1 SELECT statement has the following form:      instance. A WQL1 SELECT statement has the following form:
  
     <pre>     <pre>
         SELECT <property>...          SELECT &lt;property&gt;...
         FROM <class name>          FROM &lt;class name&gt;
         WHERE <where clause>          WHERE &lt;where clause&gt;
     </pre>     </pre>
  
     The properties may be obtained with the getProperties() method.      There are methods for obtaining the various elements of the select
     The class name may be obtained with getClassName(). The where clause      statement.
     may be evaluated by 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
Line 96 
Line 93 
     /** 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.
     */     */
Line 139 
Line 158 
         return _operations.size() != 0;         return _operations.size() != 0;
     }     }
  
     /** Evalautes the where clause using the CIMInstance as input.      /** Evalautes the where clause using the symbol table to resolve symbols.
     */     */
     Boolean evaluateWhereClause(const CIMInstance& instance) const;      Boolean evaluateWhereClause(const WQLPropertySource* source) const;
  
     /** Prints out the members of this class.     /** Prints out the members of this class.
     */     */
Line 168 
Line 187 
     //     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.
Line 197 
Line 224 
     //     //
  
     Array<WQLOperand> _operands;     Array<WQLOperand> _operands;
   
       void f() const { }
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2