[#2970] Add DSL.isnull() as a synonym for NVL() for the SQL Server dialect
This commit is contained in:
parent
b84a45a234
commit
76c4c5486a
@ -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.
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user