mysql: export some conditional functions
COALESCE, NULLIF, GREATEST and LEAST already existed and were available in the postgres dialect, but not in MySQL.
This commit is contained in:
parent
38b6caf41e
commit
792f89a857
1 changed files with 13 additions and 1 deletions
|
|
@ -261,10 +261,22 @@ func UNIX_TIMESTAMP(str StringExpression) TimestampExpression {
|
||||||
return jet.NewTimestampFunc("UNIX_TIMESTAMP", str)
|
return jet.NewTimestampFunc("UNIX_TIMESTAMP", str)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------- Comparison operators ---------------//
|
// --------------- Conditional Expressions Functions -------------//
|
||||||
|
|
||||||
// EXISTS checks for existence of the rows in subQuery
|
// EXISTS checks for existence of the rows in subQuery
|
||||||
var EXISTS = jet.EXISTS
|
var EXISTS = jet.EXISTS
|
||||||
|
|
||||||
// CASE create CASE operator with optional list of expressions
|
// CASE create CASE operator with optional list of expressions
|
||||||
var CASE = jet.CASE
|
var CASE = jet.CASE
|
||||||
|
|
||||||
|
// COALESCE function returns the first of its arguments that is not null.
|
||||||
|
var COALESCE = jet.COALESCE
|
||||||
|
|
||||||
|
// NULLIF function returns a null value if value1 equals value2; otherwise it returns value1.
|
||||||
|
var NULLIF = jet.NULLIF
|
||||||
|
|
||||||
|
// GREATEST selects the largest value from a list of expressions, or null if any of the expressions is null.
|
||||||
|
var GREATEST = jet.GREATEST
|
||||||
|
|
||||||
|
// LEAST selects the smallest value from a list of expressions, or null if any of the expressions is null.
|
||||||
|
var LEAST = jet.LEAST
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue