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

Diff for /pegasus/src/Pegasus/WQL/WQLQueryExpressionRep.cpp between version 1.5 and 1.6

version 1.5, 2006/01/30 16:18:36 version 1.6, 2007/04/17 12:38:31
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Adrian Schuur (schuur@de.ibm.com)  
 //  
 // Modified By:  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include "WQLQueryExpressionRep.h" #include "WQLQueryExpressionRep.h"
Line 49 
Line 45 
    return _stmt->getSelectPropertyList();    return _stmt->getSelectPropertyList();
 } }
  
 WQLQueryExpressionRep::~WQLQueryExpressionRep() {  WQLQueryExpressionRep::~WQLQueryExpressionRep()
   {
    if (_stmt) delete _stmt;    if (_stmt) delete _stmt;
 } }
  
 void WQLQueryExpressionRep::_parse() void WQLQueryExpressionRep::_parse()
 { {
    if (_queryLanguage=="WQL") {     if (_queryLanguage=="WQL")
      {
       _stmt=new WQLSelectStatement();       _stmt=new WQLSelectStatement();
       WQLParser::parse(_query, *_stmt);       WQLParser::parse(_query, *_stmt);
    }    }
    else throw    else throw
      PEGASUS_CIM_EXCEPTION(CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED, _queryLanguage);       PEGASUS_CIM_EXCEPTION(CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED,
                _queryLanguage);
 } }
  
 Boolean WQLQueryExpressionRep::evaluate(const CIMInstance & inst) const Boolean WQLQueryExpressionRep::evaluate(const CIMInstance & inst) const
Line 68 
Line 67 
     if (_stmt==NULL) ((WQLQueryExpressionRep*)this)->_parse();     if (_stmt==NULL) ((WQLQueryExpressionRep*)this)->_parse();
  
     WQLInstancePropertySource ips(inst);     WQLInstancePropertySource ips(inst);
     try {      try
       {
        if (_stmt->evaluateWhereClause(&ips)) return true;        if (_stmt->evaluateWhereClause(&ips)) return true;
     }     }
     catch (...) {      catch (...)
       {
          return false;          return false;
     }     }
     return false;     return false;


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2