Skip to content

Commit

Permalink
[#4156] Cannot fetch REF CURSOR OUT parameters from Oracle stored pro…
Browse files Browse the repository at this point in the history
…cedures when using SQLDialect.ORACLE11G
  • Loading branch information
lukaseder committed Mar 27, 2015
1 parent b423fe3 commit ae9233c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java
Expand Up @@ -295,7 +295,7 @@ else if (type == Byte.class || type == UByte.class) {
// -----------------------------------

// Dialect-specific data types
int ordinal = dialect == null ? SQLDialect.DEFAULT.ordinal() : dialect.ordinal();
int ordinal = dialect == null ? SQLDialect.DEFAULT.ordinal() : dialect.family().ordinal();

// [#3225] Avoid normalisation if not necessary
if (!TYPES_BY_NAME[ordinal].containsKey(typeName.toUpperCase())) {
Expand Down Expand Up @@ -355,7 +355,7 @@ public final DataType<T> precision(int p) {
public final DataType<T> precision(int p, int s) {
if (precision == p && scale == s)
return this;

// [#4120] LOB types are not allowed to have precision
else if (isLob())
return this;
Expand All @@ -377,7 +377,7 @@ public final boolean hasPrecision() {
public final DataType<T> scale(int s) {
if (scale == s)
return this;

// [#4120] LOB types are not allowed to have scale
if (isLob())
return this;
Expand All @@ -399,7 +399,7 @@ public final boolean hasScale() {
public final DataType<T> length(int l) {
if (length == l)
return this;

// [#4120] LOB types are not allowed to have length
if (isLob())
return this;
Expand Down Expand Up @@ -674,12 +674,13 @@ public static DataType<Object> getDefaultDataType(SQLDialect dialect, String typ
}

public static DataType<?> getDataType(SQLDialect dialect, String typeName) {
DataType<?> result = TYPES_BY_NAME[dialect.ordinal()].get(typeName.toUpperCase());
int ordinal = dialect.ordinal();
DataType<?> result = TYPES_BY_NAME[ordinal].get(typeName.toUpperCase());

// [#3225] Normalise only if necessary
if (result == null) {
typeName = DefaultDataType.normalise(typeName);
result = TYPES_BY_NAME[dialect.ordinal()].get(typeName);
result = TYPES_BY_NAME[ordinal].get(typeName);
}

// UDT data types and others are registered using DEFAULT
Expand Down Expand Up @@ -717,7 +718,7 @@ public static <T> DataType<T> getDataType(SQLDialect dialect, Class<T> type, Dat
DataType<?> result = null;

if (dialect != null) {
result = TYPES_BY_TYPE[dialect.ordinal()].get(type);
result = TYPES_BY_TYPE[dialect.family().ordinal()].get(type);
}

if (result == null) {
Expand Down

0 comments on commit ae9233c

Please sign in to comment.