private boolean setOutCursorType(Call call) { boolean set = false; for (Argument arg : call.getArguments()) { if (arg.getDirection() == Direction.OUT) { ProcedureParameter param = arg.getMetadataObject(); if (param != null && REF_CURSOR.equalsIgnoreCase(param.getNativeType())) { arg.setType(RefCursorType.class); set = true; } } } return set; }
@Override public void visit(Call call) { if (oracleSuppliedDriver && call.getResultSetColumnTypes().length > 0 && call.getMetadataObject() != null) { if (call.getReturnType() == null && call.getMetadataObject().getProperty(SQLConversionVisitor.TEIID_NATIVE_QUERY, false) == null) { //assume stored function handling if (!setOutCursorType(call)) { call.setReturnType(RefCursorType.class); } } else { //TODO we only will allow a single out cursor if (call.getMetadataObject() != null) { ProcedureParameter param = call.getReturnParameter(); if (param != null && REF_CURSOR.equalsIgnoreCase(param.getNativeType())) { call.setReturnType(RefCursorType.class); } } setOutCursorType(call); } } super.visit(call); }
fp.setLength(pp.getLength()); fp.setNameInSource(pp.getNameInSource()); fp.setNativeType(pp.getNativeType()); fp.setNullType(pp.getNullType()); fp.setProperties(pp.getProperties());
fp.setLength(pp.getLength()); fp.setNameInSource(pp.getNameInSource()); fp.setNativeType(pp.getNativeType()); fp.setNullType(pp.getNullType()); fp.setProperties(pp.getProperties());
fp.setLength(pp.getLength()); fp.setNameInSource(pp.getNameInSource()); fp.setNativeType(pp.getNativeType()); fp.setNullType(pp.getNullType()); fp.setProperties(pp.getProperties());