本文整理汇总了C++中OwnedHqlExpr::queryName方法的典型用法代码示例。如果您正苦于以下问题:C++ OwnedHqlExpr::queryName方法的具体用法?C++ OwnedHqlExpr::queryName怎么用?C++ OwnedHqlExpr::queryName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OwnedHqlExpr
的用法示例。
在下文中一共展示了OwnedHqlExpr::queryName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processAbstractDataset
IHqlExpression* HqlGram::processAbstractDataset(IHqlExpression* _expr, IHqlExpression* formal, IHqlExpression* actual, IHqlExpression * mapping, const attribute& errpos, bool errorIfNotFound, bool & hadError)
{
LinkedHqlExpr transformed = _expr;
IHqlExpression* formalRecord = formal->queryRecord();
IHqlExpression* actualRecord = actual->queryRecord();
assertex(formalRecord && actualRecord);
hadError = false;
IHqlSimpleScope *actualScope = actualRecord->querySimpleScope();
unsigned numChildren = formalRecord->numChildren();
for (unsigned idx = 0; idx < numChildren; idx++)
{
IHqlExpression* kid = formalRecord->queryChild(idx);
if ((kid->getOperator() == no_ifblock) || kid->isAttribute())
continue;
IIdAtom * name = kid->queryId();
IIdAtom * mapto = fieldMapTo(mapping, name);
OwnedHqlExpr match = actualScope->lookupSymbol(mapto);
if (match)
{
if (!kid->queryType()->assignableFrom(match->queryType()))
{
StringBuffer fromType, toType;
getFriendlyTypeStr(kid,fromType);
getFriendlyTypeStr(match,toType);
reportError(ERR_DSPARAM_TYPEMISMATCH, errpos, "Can not mapping type %s(field '%s') to %s(field '%s')",
fromType.str(), str(kid->queryName()), toType.str(), str(match->queryName()));
hadError = true;
}
//MORE: This should really be mapped in a single go
if (transformed)
transformed.setown(bindField(transformed, kid, match));
}
else if (errorIfNotFound)
{
reportError(ERR_DSPARM_MISSINGFIELD,errpos,"Dataset %s has no field named '%s'", str(actual->queryName()), str(mapto));
hadError = true;
}
}
return transformed.getClear();
}