当前位置: 首页>>代码示例>>C++>>正文


C++ OwnedHqlExpr::queryValue方法代码示例

本文整理汇总了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'));
    }
}
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:9,代码来源:hqlgraph.cpp

示例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;
            }
        }
    }
开发者ID:jamienoss,项目名称:HPCC-Platform,代码行数:49,代码来源:hqlcpputil.cpp

示例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);
}
开发者ID:Wrobelaf,项目名称:HPCC-Platform,代码行数:22,代码来源:fvtransform.cpp


注:本文中的OwnedHqlExpr::queryValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。