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


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

本文整理汇总了C++中OwnedHqlExpr::getLink方法的典型用法代码示例。如果您正苦于以下问题:C++ OwnedHqlExpr::getLink方法的具体用法?C++ OwnedHqlExpr::getLink怎么用?C++ OwnedHqlExpr::getLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OwnedHqlExpr的用法示例。


在下文中一共展示了OwnedHqlExpr::getLink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: buildWorkUnitViewerEcl

IHqlExpression * buildWorkUnitViewerEcl(IHqlExpression * record, const char * wuid, unsigned sequence, const char * name)
{
    OwnedHqlExpr newRecord = createSymbol(createIdentifierAtom("_SourceRecord_"), LINK(record), ob_private);
    IHqlExpression * arg = name ? createConstant(name) : createConstant((int)sequence);
    OwnedHqlExpr dataset = createDataset(no_workunit_dataset, newRecord.getLink(), createComma(createConstant(wuid), arg));
    OwnedHqlExpr projected = addSimplifyProject(dataset);
    OwnedHqlExpr output = addOutput(projected);
    return output.getClear();
}
开发者ID:aa0,项目名称:HPCC-Platform,代码行数:9,代码来源:fvwugen.cpp

示例2: createBrowseWU

bool QueryDataSource::createBrowseWU()
{
    StringAttr dataset, datasetDefs;
    StringAttrAdaptor a1(dataset), a2(datasetDefs);
    wuResult->getResultDataset(a1, a2);

    if (!dataset || !datasetDefs)
        return false;
    StringBuffer fullText;
    fullText.append(datasetDefs).append(dataset);
    OwnedHqlExpr parsed = parseQuery(fullText.str());
    if (!parsed)
        return false;

    HqlExprAttr selectFields = parsed.getLink();
    if (selectFields->getOperator() == no_output)
        selectFields.set(selectFields->queryChild(0));

    OwnedHqlExpr browseWUcode = buildQueryViewerEcl(selectFields);
    if (!browseWUcode)
        return false;
    returnedRecord.set(browseWUcode->queryChild(0)->queryRecord());

    StringAttr tempAttr;
    StringAttrAdaptor temp(tempAttr);
    Owned<IWorkUnitFactory> factory = getWorkUnitFactory();
    Owned<IConstWorkUnit> parent = factory->openWorkUnit(wuid, false);

    SCMStringBuffer user;
    StringAttrAdaptor acluster(cluster);
    parent->getClusterName(acluster);
    parent->getUser(user);

    Owned<IWorkUnit> workunit = factory->createWorkUnit(NULL, "fileViewer", user.str());
    workunit->setUser(user.str());
    workunit->setClusterName(cluster);
    workunit->setCustomerId(parent->getCustomerId(temp).str());
    workunit->setCompareMode(CompareModeOff);   // ? parent->getCompareMode()
    StringAttrAdaptor bwa(browseWuid); workunit->getWuid(bwa);

    workunit->setDebugValueInt("importImplicitModules", false, true);
    workunit->setDebugValueInt("importAllModules", false, true);
    workunit->setDebugValueInt("forceFakeThor", 1, true);

    StringBuffer jobName;
    jobName.append("FileView for ").append(wuid).append(":").append("x");
    workunit->setJobName(jobName.str());

    StringBuffer eclText;
    toECL(browseWUcode, eclText, true);
    Owned<IWUQuery> query = workunit->updateQuery();
    query->setQueryText(eclText.str());
    query->setQueryName(jobName.str());

    return true;
}
开发者ID:EwokVillage,项目名称:HPCC-Platform,代码行数:56,代码来源:fvquerysource.cpp

示例3: buildDiskFileViewerEcl

IHqlExpression * buildDiskFileViewerEcl(const char * logicalName, IHqlExpression * record)
{
    //Add filepos to the incomming record structure...
    IHqlExpression * filePosAttr = createAttribute(virtualAtom, createAttribute(filepositionAtom));
    OwnedHqlExpr filepos = createField(fileposName, makeIntType(8, false), NULL, filePosAttr);
    IHqlExpression * sizeofAttr = createAttribute(virtualAtom, createAttribute(sizeofAtom));
    OwnedHqlExpr reclen = createField(recordlenName, makeIntType(2, false), NULL, sizeofAttr);
    HqlExprArray fields;
    unwindChildren(fields, record);
    fields.append(*filepos.getLink());
    fields.append(*reclen.getLink());

    OwnedHqlExpr newRecord = createRecord(fields);
    newRecord.setown(createSymbol(createIdentifierAtom("_SourceRecord_"), newRecord.getLink(), ob_private));

    OwnedHqlExpr dataset = createNewDataset(createConstant(logicalName), newRecord.getLink(), createValue(no_thor), NULL, NULL, NULL);
    OwnedHqlExpr filtered = addFilter(dataset, filepos);
    OwnedHqlExpr projected = addSimplifyProject(filtered);
    OwnedHqlExpr output = addOutput(projected);
    return output.getClear();
}
开发者ID:aa0,项目名称:HPCC-Platform,代码行数:21,代码来源:fvwugen.cpp


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