本文整理了Java中org.apache.asterix.lang.common.statement.Query.setTopLevel
方法的一些代码示例,展示了Query.setTopLevel
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setTopLevel
方法的具体详情如下:
包路径:org.apache.asterix.lang.common.statement.Query
类名称:Query
方法名:setTopLevel
暂无
代码示例来源:origin: apache/asterixdb
var = ExpressionToVariableUtil.getGeneratedVariable(query.getBody(), true);
query.setTopLevel(true);
UpsertStatement stmt = new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(),
var, returnExpression);
代码示例来源:origin: apache/asterixdb
private Expression rewriteFunctionBody(FunctionDecl fnDecl) throws CompilationException {
SourceLocation sourceLoc = fnDecl.getSourceLocation();
Query wrappedQuery = new Query(false);
wrappedQuery.setSourceLocation(sourceLoc);
wrappedQuery.setBody(fnDecl.getFuncBody());
wrappedQuery.setTopLevel(false);
String fnNamespace = fnDecl.getSignature().getNamespace();
Dataverse defaultDataverse = metadataProvider.getDefaultDataverse();
Dataverse fnDataverse;
if (fnNamespace == null || fnNamespace.equals(defaultDataverse.getDataverseName())) {
fnDataverse = defaultDataverse;
} else {
try {
fnDataverse = metadataProvider.findDataverse(fnNamespace);
} catch (AlgebricksException e) {
throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, e, sourceLoc, fnNamespace);
}
}
metadataProvider.setDefaultDataverse(fnDataverse);
try {
IQueryRewriter queryRewriter = rewriterFactory.createQueryRewriter();
queryRewriter.rewrite(declaredFunctions, wrappedQuery, metadataProvider, context, true,
fnDecl.getParamList());
return wrappedQuery.getBody();
} finally {
metadataProvider.setDefaultDataverse(defaultDataverse);
}
}
代码示例来源:origin: apache/asterixdb
var = ExpressionToVariableUtil.getGeneratedVariable(query.getBody(), true);
query.setTopLevel(true);
InsertStatement stmt = new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(),
var, returnExpression);
代码示例来源:origin: apache/asterixdb
query.setTopLevel(true);
{if (true) return new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
returnExpression);}
代码示例来源:origin: apache/asterixdb
query.setTopLevel(true);
{if (true) return new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
returnExpression);}
代码示例来源:origin: apache/asterixdb
query.setTopLevel(true);
{if (true) return new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
returnExpression);}
代码示例来源:origin: apache/asterixdb
query.setTopLevel(true);
{if (true) return new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
returnExpression);}
代码示例来源:origin: apache/asterixdb
wrappedQuery.setSourceLocation(sourceLoc);
wrappedQuery.setBody(cfs.getFunctionBodyExpression());
wrappedQuery.setTopLevel(false);
List<VarIdentifier> paramVars = new ArrayList<>();
for (String v : cfs.getParamList()) {
内容来源于网络,如有侵权,请联系作者删除!