本文整理汇总了C++中OwnedHqlExpr::queryValue方法的典型用法代码示例。如果您正苦于以下问题:C++ OwnedHqlExpr::queryValue方法的具体用法?C++ OwnedHqlExpr::queryValue怎么用?C++ OwnedHqlExpr::queryValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OwnedHqlExpr
的用法示例。
在下文中一共展示了OwnedHqlExpr::queryValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: queryExpandFilename
static void queryExpandFilename(StringBuffer & out, IHqlExpression * expr)
{
if (expr)
{
OwnedHqlExpr folded = foldHqlExpression(expr);
if (folded->queryValue())
folded->queryValue()->generateECL(out.append('\n'));
}
}
示例2: ForEachChild
ForEachChild(i, record)
{
IHqlExpression * cur = record->queryChild(i);
switch (cur->getOperator())
{
case no_record:
expandFieldNames(errorProcessor, out, cur, prefix, sep, formatFunc);
break;
case no_ifblock:
expandFieldNames(errorProcessor, out, cur->queryChild(1), prefix, sep, formatFunc);
break;
case no_field:
{
StringBuffer lowerName;
lowerName.append(cur->queryName()).toLowerCase();
if (formatFunc)
{
HqlExprArray args;
args.append(*createConstant(lowerName.str()));
OwnedHqlExpr bound = createBoundFunction(NULL, formatFunc, args, NULL, true);
OwnedHqlExpr folded = foldHqlExpression(errorProcessor, bound, NULL, HFOthrowerror|HFOfoldimpure|HFOforcefold);
assertex(folded->queryValue());
lowerName.clear();
getStringValue(lowerName, folded);
}
switch (cur->queryType()->getTypeCode())
{
case type_record:
case type_row:
{
unsigned len = prefix.length();
prefix.append(lowerName).append(".");
expandFieldNames(errorProcessor, out, cur->queryRecord(), prefix, sep, formatFunc);
prefix.setLength(len);
break;
}
default:
{
if (out.length())
out.append(sep);
out.append(prefix).append(lowerName);
break;
}
}
break;
}
}
}
示例3: transform
void ViewFieldECLTransformer::transform(unsigned & lenTarget, char * & target, unsigned lenSource, const char * source, const HqlExprArray & extraArgs)
{
Owned<ITypeInfo> sourceType = makeUtf8Type(lenSource, 0);
IValue * sourceValue = createUtf8Value(source, LINK(sourceType));
OwnedHqlExpr sourceExpr = createConstant(sourceValue);
HqlExprArray actuals;
actuals.append(*LINK(sourceExpr));
appendArray(actuals, extraArgs);
Owned<IErrorReceiver> errorReporter = createThrowingErrorReceiver();
OwnedHqlExpr call = createBoundFunction(errorReporter, function, actuals, NULL, true);
OwnedHqlExpr castValue = ensureExprType(call, utf8Type);
OwnedHqlExpr folded = quickFoldExpression(castValue, NULL, 0);
IValue * foldedValue = folded->queryValue();
assertex(foldedValue);
unsigned len = foldedValue->queryType()->getStringLen();
const char * data = static_cast<const char *>(foldedValue->queryValue());
unsigned size = rtlUtf8Size(len, data);
lenTarget = len;
target = (char *)rtlMalloc(size);
memcpy(target, data, size);
}