org.teiid.query.sql.lang.Query.getInto()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(410)

本文整理了Java中org.teiid.query.sql.lang.Query.getInto方法的一些代码示例,展示了Query.getInto的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getInto方法的具体详情如下:
包路径:org.teiid.query.sql.lang.Query
类名称:Query
方法名:getInto

Query.getInto介绍

暂无

代码示例

代码示例来源:origin: org.jboss.teiid/teiid-engine

@Deprecated
public Command getCommand() {
  if (command != null) {
    return command;
  }
  if (value instanceof ScalarSubquery && ((ScalarSubquery)value).getCommand() instanceof Query) {
    Query query = (Query)((ScalarSubquery)value).getCommand();
    if (query.getInto() != null) {
      return query;
    }
  }
  return null;
}

代码示例来源:origin: teiid/teiid

@Deprecated
public Command getCommand() {
  if (command != null) {
    return command;
  }
  if (value instanceof ScalarSubquery && ((ScalarSubquery)value).getCommand() instanceof Query) {
    Query query = (Query)((ScalarSubquery)value).getCommand();
    if (query.getInto() != null) {
      return query;
    }
  }
  return null;
}

代码示例来源:origin: org.teiid/teiid-engine

@Deprecated
public Command getCommand() {
  if (command != null) {
    return command;
  }
  if (value instanceof ScalarSubquery && ((ScalarSubquery)value).getCommand() instanceof Query) {
    Query query = (Query)((ScalarSubquery)value).getCommand();
    if (query.getInto() != null) {
      return query;
    }
  }
  return null;
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * @see org.teiid.query.sql.lang.Command#areResultsCachable()
 */
public boolean areResultsCachable() {
  if(this.getInto() != null){
    return false;
  }
  if (isXML) {
    return true;
  }
  List<Expression> projectedSymbols = getProjectedSymbols();
  return areColumnsCachable(projectedSymbols);
}

代码示例来源:origin: org.teiid/teiid-engine

/**
 * @see org.teiid.query.sql.lang.Command#areResultsCachable()
 */
public boolean areResultsCachable() {
  if(this.getInto() != null){
    return false;
  }
  List<Expression> projectedSymbols = getProjectedSymbols();
  return areColumnsCachable(projectedSymbols);
}

代码示例来源:origin: teiid/teiid

/**
 * @see org.teiid.query.sql.lang.Command#areResultsCachable()
 */
public boolean areResultsCachable() {
  if(this.getInto() != null){
    return false;
  }
  List<Expression> projectedSymbols = getProjectedSymbols();
  return areColumnsCachable(projectedSymbols);
}

代码示例来源:origin: org.teiid/teiid-engine

public void visit(Query obj) {
  validateHasProjectedSymbols(obj);
  this.inQuery = true;
  validateAggregates(obj);
  if (obj.getInto() != null) {
    validateSelectInto(obj);
  }                        
}

代码示例来源:origin: teiid/teiid

public void visit(Query obj) {
  validateHasProjectedSymbols(obj);
  this.inQuery = true;
  validateAggregates(obj);
  if (obj.getInto() != null) {
    validateSelectInto(obj);
  }                        
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * Validates SELECT INTO queries.
 * @param query
 * @since 4.2
 */
protected void validateSelectInto(Query query) {
  List<Expression> symbols = query.getSelect().getProjectedSymbols();
  GroupSymbol intoGroup = query.getInto().getGroup();
  validateInto(query, symbols, intoGroup);
}

代码示例来源:origin: org.teiid/teiid-engine

/**
 * Validates SELECT INTO queries.
 * @param query
 * @since 4.2
 */
protected void validateSelectInto(Query query) {
  List<Expression> symbols = query.getSelect().getProjectedSymbols();
  GroupSymbol intoGroup = query.getInto().getGroup();
  validateInto(query, symbols, intoGroup);
}

代码示例来源:origin: teiid/teiid

/**
 * Validates SELECT INTO queries.
 * @param query
 * @since 4.2
 */
protected void validateSelectInto(Query query) {
  List<Expression> symbols = query.getSelect().getProjectedSymbols();
  GroupSymbol intoGroup = query.getInto().getGroup();
  validateInto(query, symbols, intoGroup);
}

代码示例来源:origin: org.teiid/teiid-engine

private void validateSubquery(SubqueryContainer<?> subQuery) {
  if (subQuery.getCommand() instanceof Query && ((Query)subQuery.getCommand()).getInto() != null) {
    handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.subquery_insert"), subQuery.getCommand()); //$NON-NLS-1$
  }
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

private void validateSubquery(SubqueryContainer<?> subQuery) {
  if (subQuery.getCommand() instanceof Query && ((Query)subQuery.getCommand()).getInto() != null) {
    handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.subquery_insert"), subQuery.getCommand()); //$NON-NLS-1$
  }
}

代码示例来源:origin: teiid/teiid

private void validateSubquery(SubqueryContainer<?> subQuery) {
  if (subQuery.getCommand() instanceof Query && ((Query)subQuery.getCommand()).getInto() != null) {
    handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.subquery_insert"), subQuery.getCommand()); //$NON-NLS-1$
  }
}

代码示例来源:origin: teiid/teiid

protected void validateSetQuery(SetQuery query) {
  // Walk through sub queries - validate each one separately and
  // also check the columns of each for comparability
  for (QueryCommand subQuery : query.getQueryCommands()) {
    if (subQuery instanceof Query && ((Query)subQuery).getInto() != null) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.union_insert"), query); //$NON-NLS-1$
    }
  }
  
  if (!query.isAll() || query.getOperation() == Operation.EXCEPT || query.getOperation() == Operation.INTERSECT) {
    validateSortable(query.getProjectedSymbols());
  }
  
  if (query.isAll() && (query.getOperation() == Operation.EXCEPT || query.getOperation() == Operation.INTERSECT)) {
    handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.excpet_intersect_all"), query); //$NON-NLS-1$
  }
}

代码示例来源:origin: org.teiid/teiid-engine

protected void validateSetQuery(SetQuery query) {
  // Walk through sub queries - validate each one separately and
  // also check the columns of each for comparability
  for (QueryCommand subQuery : query.getQueryCommands()) {
    if (subQuery instanceof Query && ((Query)subQuery).getInto() != null) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.union_insert"), query); //$NON-NLS-1$
    }
  }
  
  if (!query.isAll() || query.getOperation() == Operation.EXCEPT || query.getOperation() == Operation.INTERSECT) {
    validateSortable(query.getProjectedSymbols());
  }
  
  if (query.isAll() && (query.getOperation() == Operation.EXCEPT || query.getOperation() == Operation.INTERSECT)) {
    handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.excpet_intersect_all"), query); //$NON-NLS-1$
  }
}

代码示例来源:origin: teiid/teiid

public void testClone3() {
    Query q = sample2();
    q.setInto(new Into(new GroupSymbol("#foo"))); //$NON-NLS-1$
    Query qclone = (Query)q.clone();
    assertNotNull(qclone.getInto());
  }
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

protected void validateSetQuery(SetQuery query) {
  // Walk through sub queries - validate each one separately and
  // also check the columns of each for comparability
  for (QueryCommand subQuery : query.getQueryCommands()) {
    if(isXMLCommand(subQuery)) {
      handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0034"), query); //$NON-NLS-1$
    }
    if (subQuery instanceof Query && ((Query)subQuery).getInto() != null) {
      handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.union_insert"), query); //$NON-NLS-1$
    }
  }
  
  if (!query.isAll() || query.getOperation() == Operation.EXCEPT || query.getOperation() == Operation.INTERSECT) {
    validateSortable(query.getProjectedSymbols());
  }
  
  if (query.isAll() && (query.getOperation() == Operation.EXCEPT || query.getOperation() == Operation.INTERSECT)) {
    handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.excpet_intersect_all"), query); //$NON-NLS-1$
  }
}

代码示例来源:origin: teiid/teiid

public void visit(Query obj) {
  preVisitVisitor(obj);
  visitNodes(obj.getWith());
  visitNode(obj.getSelect());
  visitNode(obj.getInto());
  visitNode(obj.getFrom());
  visitNode(obj.getCriteria());
  visitNode(obj.getGroupBy());
  visitNode(obj.getHaving());
  visitNode(obj.getOrderBy());
  visitNode(obj.getLimit());
  visitNode(obj.getOption());
  postVisitVisitor(obj);
}
public void visit(RaiseStatement obj) {

代码示例来源:origin: org.teiid/teiid-engine

public void visit(Query obj) {
  preVisitVisitor(obj);
  visitNodes(obj.getWith());
  visitNode(obj.getSelect());
  visitNode(obj.getInto());
  visitNode(obj.getFrom());
  visitNode(obj.getCriteria());
  visitNode(obj.getGroupBy());
  visitNode(obj.getHaving());
  visitNode(obj.getOrderBy());
  visitNode(obj.getLimit());
  visitNode(obj.getOption());
  postVisitVisitor(obj);
}
public void visit(RaiseStatement obj) {

相关文章