本文整理了Java中org.teiid.query.sql.lang.Query.setSourceHint
方法的一些代码示例,展示了Query.setSourceHint
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setSourceHint
方法的具体详情如下:
包路径:org.teiid.query.sql.lang.Query
类名称:Query
方法名:setSourceHint
暂无
代码示例来源:origin: teiid/teiid
void setSourceHint(SourceHint sourceHint, Command command) {
if (sourceHint != null) {
if (command instanceof SetQuery) {
((SetQuery)command).getProjectedQuery().setSourceHint(sourceHint);
} else {
command.setSourceHint(sourceHint);
}
}
}
代码示例来源:origin: org.teiid/teiid-engine
void setSourceHint(SourceHint sourceHint, Command command) {
if (sourceHint != null) {
if (command instanceof SetQuery) {
((SetQuery)command).getProjectedQuery().setSourceHint(sourceHint);
} else {
command.setSourceHint(sourceHint);
}
}
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
void setSourceHint(SourceHint sourceHint, Command command) {
if (sourceHint != null) {
if (command instanceof SetQuery) {
((SetQuery)command).getProjectedQuery().setSourceHint(sourceHint);
} else {
command.setSourceHint(sourceHint);
}
}
}
代码示例来源:origin: org.teiid/teiid-engine
/**
* This method will alias each of the select into elements to the corresponding column name in the
* target table. This ensures that they will all be uniquely named.
*
* @param query
* @throws QueryValidatorException
*/
private Command rewriteSelectInto(Query query) throws TeiidProcessingException{
Into into = query.getInto();
try {
List<ElementSymbol> allIntoElements = Util.deepClone(ResolverUtil.resolveElementsInGroup(into.getGroup(), metadata), ElementSymbol.class);
Insert insert = new Insert(into.getGroup(), allIntoElements, Collections.emptyList());
insert.setSourceHint(query.getSourceHint());
query.setSourceHint(null);
query.setInto(null);
insert.setQueryExpression(query);
return rewriteInsert(correctDatatypes(insert));
} catch (QueryMetadataException e) {
throw new QueryValidatorException(e);
} catch (TeiidComponentException e) {
throw new QueryValidatorException(e);
}
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
/**
* This method will alias each of the select into elements to the corresponding column name in the
* target table. This ensures that they will all be uniquely named.
*
* @param query
* @throws QueryValidatorException
*/
private Command rewriteSelectInto(Query query) throws TeiidProcessingException{
Into into = query.getInto();
try {
List<ElementSymbol> allIntoElements = Util.deepClone(ResolverUtil.resolveElementsInGroup(into.getGroup(), metadata), ElementSymbol.class);
Insert insert = new Insert(into.getGroup(), allIntoElements, Collections.emptyList());
insert.setSourceHint(query.getSourceHint());
query.setSourceHint(null);
query.setInto(null);
insert.setQueryExpression(query);
return rewriteInsert(correctDatatypes(insert));
} catch (QueryMetadataException e) {
throw new QueryValidatorException(e);
} catch (TeiidComponentException e) {
throw new QueryValidatorException(e);
}
}
代码示例来源:origin: teiid/teiid
/**
* This method will alias each of the select into elements to the corresponding column name in the
* target table. This ensures that they will all be uniquely named.
*
* @param query
* @throws QueryValidatorException
*/
private Command rewriteSelectInto(Query query) throws TeiidProcessingException{
Into into = query.getInto();
try {
List<ElementSymbol> allIntoElements = Util.deepClone(ResolverUtil.resolveElementsInGroup(into.getGroup(), metadata), ElementSymbol.class);
Insert insert = new Insert(into.getGroup(), allIntoElements, Collections.emptyList());
insert.setSourceHint(query.getSourceHint());
query.setSourceHint(null);
query.setInto(null);
insert.setQueryExpression(query);
return rewriteInsert(correctDatatypes(insert));
} catch (QueryMetadataException e) {
throw new QueryValidatorException(e);
} catch (TeiidComponentException e) {
throw new QueryValidatorException(e);
}
}
代码示例来源:origin: org.teiid/teiid-engine
command = queryCommand;
queryCommand.setSourceHint((SourceHint) accessNode.getProperty(Info.SOURCE_HINT));
queryCommand.getProjectedQuery().setSourceHint((SourceHint) accessNode.getProperty(Info.SOURCE_HINT));
if (intoGroup != null) {
Insert insertCommand = (Insert)commandRoot.getParent().getProperty(NodeConstants.Info.VIRTUAL_COMMAND);
代码示例来源:origin: teiid/teiid
command = queryCommand;
queryCommand.setSourceHint((SourceHint) accessNode.getProperty(Info.SOURCE_HINT));
queryCommand.getProjectedQuery().setSourceHint((SourceHint) accessNode.getProperty(Info.SOURCE_HINT));
if (intoGroup != null) {
Insert insertCommand = (Insert)commandRoot.getParent().getProperty(NodeConstants.Info.VIRTUAL_COMMAND);
代码示例来源:origin: org.jboss.teiid/teiid-engine
command = queryCommand;
queryCommand.setSourceHint((SourceHint) accessNode.getProperty(Info.SOURCE_HINT));
queryCommand.getProjectedQuery().setSourceHint((SourceHint) accessNode.getProperty(Info.SOURCE_HINT));
if (intoGroup != null) {
Insert insertCommand = (Insert)commandRoot.getParent().getProperty(NodeConstants.Info.VIRTUAL_COMMAND);
内容来源于网络,如有侵权,请联系作者删除!