@Override public RelDataType getCursorOperand(int ordinal) { final SqlNode operand = call.operand(ordinal); if (!SqlUtil.isCallTo(operand, SqlStdOperatorTable.CURSOR)) { return null; } final SqlCall cursorCall = (SqlCall) operand; final SqlNode query = cursorCall.operand(0); return validator.deriveType(scope, query); }
@Override public RelDataType getCursorOperand(int ordinal) { final SqlNode operand = call.operand(ordinal); if (!SqlUtil.isCallTo(operand, SqlStdOperatorTable.CURSOR)) { return null; } final SqlCall cursorCall = (SqlCall) operand; final SqlNode query = cursorCall.operand(0); return validator.deriveType(scope, query); }
@Override public String getColumnListParamInfo( int ordinal, String paramName, List<String> columnList) { final SqlNode operand = call.operand(ordinal); if (!SqlUtil.isCallTo(operand, SqlStdOperatorTable.ROW)) { return null; } for (SqlNode id : ((SqlCall) operand).getOperandList()) { columnList.add(((SqlIdentifier) id).getSimple()); } return validator.getParentCursor(paramName); }
@Override public String getColumnListParamInfo( int ordinal, String paramName, List<String> columnList) { final SqlNode operand = call.operand(ordinal); if (!SqlUtil.isCallTo(operand, SqlStdOperatorTable.ROW)) { return null; } for (SqlNode id : ((SqlCall) operand).getOperandList()) { columnList.add(((SqlIdentifier) id).getSimple()); } return validator.getParentCursor(paramName); }
SqlNode selectItem = selectList.get(i); String name = null; if (SqlUtil.isCallTo( selectItem, SqlStdOperatorTable.AS)) {
SqlNode selectItem = selectList.get(i); String name = null; if (SqlUtil.isCallTo( selectItem, SqlStdOperatorTable.AS)) {
SqlNode selectItem = selectList.get(i); String name = null; if (SqlUtil.isCallTo( selectItem, SqlStdOperatorTable.AS)) {
SqlNode selectItem = selectList.get(i); String name = null; if (SqlUtil.isCallTo( selectItem, SqlStdOperatorTable.AS)) {
void arg(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec, int i) { if (SqlUtil.isCallTo(call.operand(i), SqlStdOperatorTable.ROW)) { SqlCall row = call.operand(i); writer.keyword("PERIOD"); writer.sep("(", true); row.operand(0).unparse(writer, leftPrec, rightPrec); writer.sep(",", true); row.operand(1).unparse(writer, leftPrec, rightPrec); writer.sep(")", true); } else { call.operand(i).unparse(writer, leftPrec, rightPrec); } }
void arg(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec, int i) { if (SqlUtil.isCallTo(call.operand(i), SqlStdOperatorTable.ROW)) { SqlCall row = call.operand(i); writer.keyword("PERIOD"); writer.sep("(", true); row.operand(0).unparse(writer, leftPrec, rightPrec); writer.sep(",", true); row.operand(1).unparse(writer, leftPrec, rightPrec); writer.sep(")", true); } else { call.operand(i).unparse(writer, leftPrec, rightPrec); } }