version 1.16, 2006/05/02 20:26:58
|
version 1.17, 2007/03/16 17:16:48
|
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"QC not set"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"QC not set"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
catch (CQLNullContagionException& ) | catch (CQLNullContagionException& ) |
{ | { |
// The null contagion rule. | // The null contagion rule. |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null contagion"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null contagion"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return false; | return false; |
} | } |
} | } |
| |
PEGASUS_UNREACHABLE( PEGASUS_ASSERT(false); ) | PEGASUS_UNREACHABLE( PEGASUS_ASSERT(false); ) |
PEGASUS_UNREACHABLE( PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"should not get here in evaluate"); ) |
PEGASUS_UNREACHABLE( PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"should not get here in evaluate"); ) |
PEGASUS_UNREACHABLE( return true; ) //should never get here | PEGASUS_UNREACHABLE( return true; ) //should never get here |
} | } |
| |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"QC not set"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"QC not set"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
// Mark the current node as wildcarded. | // Mark the current node as wildcarded. |
if (ids[j].isWildcard()) | if (ids[j].isWildcard()) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"id is wildcard"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"id is wildcard"); |
curNode->wildcard = true; | curNode->wildcard = true; |
break; | break; |
} | } |
|
|
String::equalNoCase(curChild->scope.getString(), scope)) | String::equalNoCase(curChild->scope.getString(), scope)) |
{ | { |
// Name and scope match. The identifier is already child node. | // Name and scope match. The identifier is already child node. |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"id is already a child node"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"id is already a child node"); |
found = true; | found = true; |
} | } |
else | else |
|
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT | #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
) | ) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"not emb"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"not emb"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROP_NOT_EMB", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROP_NOT_EMB", |
"The property $0 must contain an embedded object.", | "The property $0 must contain an embedded object.", |
|
|
if (nodeVal.isNull()) | if (nodeVal.isNull()) |
{ | { |
// Since we will be projecting on the embedded object, it cannot be null | // Since we will be projecting on the embedded object, it cannot be null |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"value is null"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"value is null"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.NULL_EMB_OBJ", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.NULL_EMB_OBJ", |
"The embedded object property $0 cannot contain a null value.", | "The embedded object property $0 cannot contain a null value.", |
|
|
// an embedded object with properties or wildcard. | // an embedded object with properties or wildcard. |
// Examples not allowed: SELECT fromClass.someArrayProp.scope::notAllowedProp FROM fromClass | // Examples not allowed: SELECT fromClass.someArrayProp.scope::notAllowedProp FROM fromClass |
// SELECT fromClass.someArrayProp.* FROM fromClass | // SELECT fromClass.someArrayProp.* FROM fromClass |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"array index needed"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"array index needed"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_WHOLE_ARRAY", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_WHOLE_ARRAY", |
"CQL requires that array indexing is used on embedded object property $0.", | "CQL requires that array indexing is used on embedded object property $0.", |
|
|
if (nodeObj.isUninitialized()) | if (nodeObj.isUninitialized()) |
{ | { |
// Not allowed to project on an uninitialized object | // Not allowed to project on an uninitialized object |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"is uninitialized"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"is uninitialized"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_UNINIT", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_UNINIT", |
"The embedded object property $0 is uninitialized.", | "The embedded object property $0 is uninitialized.", |
|
|
if (!nodeObj.isInstance()) | if (!nodeObj.isInstance()) |
{ | { |
// Not allowed to project on a Class | // Not allowed to project on a Class |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"is a class"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"is a class"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_CLASS", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_CLASS", |
"CQL does not allow properties to be projected on class $0.", | "CQL does not allow properties to be projected on class $0.", |
|
|
if (nodeInst.isUninitialized()) | if (nodeInst.isUninitialized()) |
{ | { |
// Not allowed to project on an uninitialized object | // Not allowed to project on an uninitialized object |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"is uninitialized"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"is uninitialized"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_UNINIT", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_UNINIT", |
"The embedded object property $0 is uninitialized.", | "The embedded object property $0 is uninitialized.", |
|
|
if (inst.getClassName() == node->scope) | if (inst.getClassName() == node->scope) |
{ | { |
// The instance's class is the same as the required scope | // The instance's class is the same as the required scope |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"instance matches scope"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"instance matches scope"); |
filterable = true; | filterable = true; |
} | } |
else | else |
|
|
if (_ctx->isSubClass(node->scope, inst.getClassName())) | if (_ctx->isSubClass(node->scope, inst.getClassName())) |
{ | { |
// The instance's class is a subclass of the required scope. | // The instance's class is a subclass of the required scope. |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"instance is subclass of scope"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"instance is subclass of scope"); |
filterable = true; | filterable = true; |
} | } |
} | } |
|
|
// Just swallow this error because according to the | // Just swallow this error because according to the |
// spec we should be putting NULL in the result column, | // spec we should be putting NULL in the result column, |
// which means skipping the property on the instance. | // which means skipping the property on the instance. |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"scope class not in schema"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"scope class not in schema"); |
} | } |
else | else |
{ | { |
|
|
// The allPropsClass is either the FROM class or the class of an embedded instance. | // The allPropsClass is either the FROM class or the class of an embedded instance. |
if (allPropsRequired) | if (allPropsRequired) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"all props required"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"all props required"); |
CIMClass cls = _ctx->getClass(allPropsClass); | CIMClass cls = _ctx->getClass(allPropsClass); |
Array<CIMName> clsProps; | Array<CIMName> clsProps; |
for (Uint32 i = 0; i < cls.getPropertyCount(); i++) | for (Uint32 i = 0; i < cls.getPropertyCount(); i++) |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
} | } |
catch (const CIMException& ce) | catch (const CIMException& ce) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"repository error"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"repository error"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
if (ce.getCode() == CIM_ERR_NOT_FOUND || | if (ce.getCode() == CIM_ERR_NOT_FOUND || |
ce.getCode() == CIM_ERR_INVALID_CLASS) | ce.getCode() == CIM_ERR_INVALID_CLASS) |
|
|
PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::getClassPathList"); | PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::getClassPathList"); |
| |
if(_ctx == NULL){ | if(_ctx == NULL){ |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
} | } |
catch (const CIMException& ce) | catch (const CIMException& ce) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"cim exception"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"cim exception"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
if (ce.getCode() == CIM_ERR_NOT_FOUND || | if (ce.getCode() == CIM_ERR_NOT_FOUND || |
ce.getCode() == CIM_ERR_INVALID_CLASS) | ce.getCode() == CIM_ERR_INVALID_CLASS) |
|
|
} | } |
catch (const CIMException& ce) | catch (const CIMException& ce) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"cim exception"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"cim exception"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
if (ce.getCode() == CIM_ERR_NOT_FOUND || | if (ce.getCode() == CIM_ERR_NOT_FOUND || |
ce.getCode() == CIM_ERR_INVALID_CLASS) | ce.getCode() == CIM_ERR_INVALID_CLASS) |
|
|
} | } |
catch (const CIMException& ce) | catch (const CIMException& ce) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"cim exception"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"cim exception"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
if (ce.getCode() == CIM_ERR_NOT_FOUND || | if (ce.getCode() == CIM_ERR_NOT_FOUND || |
ce.getCode() == CIM_ERR_INVALID_CLASS) | ce.getCode() == CIM_ERR_INVALID_CLASS) |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
if (allProps) | if (allProps) |
{ | { |
// Return null property list to indicate all properties are required. | // Return null property list to indicate all properties are required. |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"all props req"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"all props req"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return CIMPropertyList(); | return CIMPropertyList(); |
} | } |
|
|
if (containsProperty(scopingClass, unmatchedScopes)) | if (containsProperty(scopingClass, unmatchedScopes)) |
{ | { |
// Scoping class is a subclass. | // Scoping class is a subclass. |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"scoping class is a subclass"); |
PEG_TRACE_CSTRING(TRC_CQL, Tracer::LEVEL4,"scoping class is a subclass"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return false; | return false; |
} | } |
|
|
// Check if the scoping class is a superclass of the class passed in | // Check if the scoping class is a superclass of the class passed in |
if (isSuper || _ctx->isSubClass(scopingClass, className)) | if (isSuper || _ctx->isSubClass(scopingClass, className)) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"scoping class is a superclass"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"scoping class is a superclass"); |
| |
// Scoping class is a superclass of the class passed in. | // Scoping class is a superclass of the class passed in. |
if (!isSuper) | if (!isSuper) |
|
|
} | } |
else | else |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"scoping class is NOT a superclass"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"scoping class is NOT a superclass"); |
| |
// Scoping class is not superclass of class passed in. | // Scoping class is not superclass of class passed in. |
// Save this information. | // Save this information. |
|
|
CIMName fromClassName = _ctx->getFromList()[0].getName(); | CIMName fromClassName = _ctx->getFromList()[0].getName(); |
if (fromClassName == className) | if (fromClassName == className) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"wildcard and = FROM"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"wildcard and = FROM"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return true; | return true; |
} | } |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |
|
|
| |
if(_ctx == NULL) | if(_ctx == NULL) |
{ | { |
PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_TRACE_CSTRING (TRC_CQL, Tracer::LEVEL4,"null QC"); |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", | MessageLoaderParms parms("CQL.CQLSelectStatementRep.QUERY_CONTEXT_IS_NULL", |
"Trying to process a query with a NULL Query Context."); | "Trying to process a query with a NULL Query Context."); |