public static boolean hasOutputParams(Command command) { boolean hasOutParams = false; if (command instanceof StoredProcedure) { StoredProcedure sp = (StoredProcedure)command; hasOutParams = sp.returnParameters() && sp.getProjectedSymbols().size() > sp.getResultSetColumns().size(); } return hasOutParams; }
public static boolean hasOutputParams(Command command) { boolean hasOutParams = false; if (command instanceof StoredProcedure) { StoredProcedure sp = (StoredProcedure)command; hasOutParams = sp.returnParameters() && sp.getProjectedSymbols().size() > sp.getResultSetColumns().size(); } return hasOutParams; }
public static boolean hasOutputParams(Command command) { boolean hasOutParams = false; if (command instanceof StoredProcedure) { StoredProcedure sp = (StoredProcedure)command; hasOutParams = sp.returnParameters() && sp.getProjectedSymbols().size() > sp.getResultSetColumns().size(); } return hasOutParams; }
/** * Get the ordered list of all elements returned by this query. These elements * may be ElementSymbols or ExpressionSymbols but in all cases each represents a * single column. * @return Ordered list of ElementSymbol */ public List getProjectedSymbols(){ if (!returnParameters()) { return getResultSetColumns(); } //add result set columns List<ElementSymbol> result = new ArrayList<ElementSymbol>(getResultSetColumns()); int size = result.size(); //add out/inout parameter symbols for (SPParameter parameter : mapOfParameters.values()) { if(parameter.getParameterType() == ParameterInfo.RETURN_VALUE){ ElementSymbol symbol = parameter.getParameterSymbol(); symbol.setGroupSymbol(this.getGroup()); //should be first among parameters, which we'll ensure result.add(size, symbol); } else if(parameter.getParameterType() == ParameterInfo.INOUT || parameter.getParameterType() == ParameterInfo.OUT){ ElementSymbol symbol = parameter.getParameterSymbol(); symbol.setGroupSymbol(this.getGroup()); result.add(symbol); } } return result; }
/** * Get the ordered list of all elements returned by this query. These elements * may be ElementSymbols or ExpressionSymbols but in all cases each represents a * single column. * @return Ordered list of ElementSymbol */ public List getProjectedSymbols(){ if (!returnParameters()) { return getResultSetColumns(); } //add result set columns List<ElementSymbol> result = new ArrayList<ElementSymbol>(getResultSetColumns()); int size = result.size(); //add out/inout parameter symbols for (SPParameter parameter : mapOfParameters.values()) { if(parameter.getParameterType() == ParameterInfo.RETURN_VALUE){ ElementSymbol symbol = parameter.getParameterSymbol(); symbol.setGroupSymbol(this.getGroup()); //should be first among parameters, which we'll ensure result.add(size, symbol); } else if(parameter.getParameterType() == ParameterInfo.INOUT || parameter.getParameterType() == ParameterInfo.OUT){ ElementSymbol symbol = parameter.getParameterSymbol(); symbol.setGroupSymbol(this.getGroup()); result.add(symbol); } } return result; }
/** * Get the ordered list of all elements returned by this query. These elements * may be ElementSymbols or ExpressionSymbols but in all cases each represents a * single column. * @return Ordered list of ElementSymbol */ public List getProjectedSymbols(){ if (!returnParameters()) { return getResultSetColumns(); } //add result set columns List<ElementSymbol> result = new ArrayList<ElementSymbol>(getResultSetColumns()); int size = result.size(); //add out/inout parameter symbols for (SPParameter parameter : mapOfParameters.values()) { if(parameter.getParameterType() == ParameterInfo.RETURN_VALUE){ ElementSymbol symbol = parameter.getParameterSymbol(); symbol.setGroupSymbol(this.getGroup()); //should be first among parameters, which we'll ensure result.add(size, symbol); } else if(parameter.getParameterType() == ParameterInfo.INOUT || parameter.getParameterType() == ParameterInfo.OUT){ ElementSymbol symbol = parameter.getParameterSymbol(); symbol.setGroupSymbol(this.getGroup()); result.add(symbol); } } return result; }
if (command instanceof StoredProcedure) { StoredProcedure sp = (StoredProcedure)command; if (sp.returnParameters() && sp.getProjectedSymbols().size() > sp.getResultSetColumns().size()) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID30561, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30561, command));
if (command instanceof StoredProcedure) { StoredProcedure sp = (StoredProcedure)command; if (sp.returnParameters() && sp.getProjectedSymbols().size() > sp.getResultSetColumns().size()) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID30561, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30561, command));
if (command instanceof StoredProcedure) { StoredProcedure sp = (StoredProcedure)command; if (sp.returnParameters() && sp.getProjectedSymbols().size() > sp.getResultSetColumns().size()) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID30561, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30561, command));
this.expectedColumns = command.getProjectedSymbols().size(); if (command instanceof StoredProcedure) { this.expectedColumns = ((StoredProcedure)command).getResultSetColumns().size();
this.expectedColumns = command.getProjectedSymbols().size(); if (command instanceof StoredProcedure) { this.expectedColumns = ((StoredProcedure)command).getResultSetColumns().size();
this.expectedColumns = command.getProjectedSymbols().size(); if (command instanceof StoredProcedure) { this.expectedColumns = ((StoredProcedure)command).getResultSetColumns().size();