Code review comment for lp:~zorba-coders/zorba/bug1147563

Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

> A few comments:
> - for following method, getting the type of the content of a global element
> shouldn't have anything to do with element's nillable property. Please add a
> different method to return the nillable of a global element or it's
> definition.
>
> void Schema::getTypeNameFromElementName(
> const store::Item* qname,
> store::Item_t& typeName,
> >>> + bool& nillable,
> const QueryLoc& loc);
>
> Same comment goes for:
> - CTX_TM->get_schema_element_typename(elemQNameItem, typeQNameItem,
> nillable, loc);
> - Schema:: createXQTypeFromElementName(typeManager,
> 503 + sourceNode->getNodeName(),
> 504 + false,
> 505 + nillable,
> 506 + loc);

Adding a second method is unnecessary overhead, as the callers of these methods need both the type and the nillable property of a global element declaration. Intead, I have changed the names of these methods to better reflect what they do and how they are used.

« Back to merge proposal