ifNull static method
Create sql statement with function IFNULL()
function applied for two QueryParts,
IFNULL()
is used to get first not null value of x
and y
, if two values are null,
it returns null.
Implementation
static QueryPart ifNull(QueryPart x, QueryPart y) {
var result = QueryPart._();
result.queryBuilder = () => 'IFNULL(${x.buildQuery()},${y.buildQuery()})';
result.parametersBuilder =
() => [...x.getParameters(), ...y.getParameters()];
return result;
}