[#2970] Add DSL.isnull() as a synonym for NVL() for the SQL Server dialect

This commit is contained in:
Lukas Eder 2014-01-22 09:38:59 +01:00
parent b84a45a234
commit 76c4c5486a

View File

@ -6141,6 +6141,78 @@ public class DSL {
return function("coalesce", nullSafeDataType(field), nullSafe(combine(field, fields)));
}
/**
* Gets the SQL Server-style ISNULL(value, defaultValue) function.
*
* @see #nvl(Field, Field)
*/
@Support
@Transition(
name = "ISNULL",
args = {
"Field",
"Field"
},
to = "Function"
)
public static <T> Field<T> isnull(T value, T defaultValue) {
return nvl(value, defaultValue);
}
/**
* Gets the SQL Server-style ISNULL(value, defaultValue) function.
*
* @see #nvl(Field, Field)
*/
@Support
@Transition(
name = "ISNULL",
args = {
"Field",
"Field"
},
to = "Function"
)
public static <T> Field<T> isnull(T value, Field<T> defaultValue) {
return nvl(value, defaultValue);
}
/**
* Gets the SQL Server-style ISNULL(value, defaultValue) function.
*
* @see #nvl(Field, Field)
*/
@Support
@Transition(
name = "ISNULL",
args = {
"Field",
"Field"
},
to = "Function"
)
public static <T> Field<T> isnull(Field<T> value, T defaultValue) {
return nvl(value, defaultValue);
}
/**
* Gets the SQL Server-style ISNULL(value, defaultValue) function.
*
* @see #nvl(Field, Field)
*/
@Support
@Transition(
name = "ISNULL",
args = {
"Field",
"Field"
},
to = "Function"
)
public static <T> Field<T> isnull(Field<T> value, Field<T> defaultValue) {
return nvl(value, defaultValue);
}
/**
* Gets the Oracle-style NVL(value, defaultValue) function.
*