SqlCase constructor

SqlCase({
  1. Sql? baseSql,
  2. required Map<Sql, Sql> cases,
  3. Sql? elseSql,
  4. bool parenthesized = true,
})

Composes a CASE expression and wraps the result.

  • If the baseSql argument is not null, the composed CASE expression will have baseSql as a base expression.
  • If the elseSql argument is not null, the composed CASE expression will have elseSql as an else expression.
  • If the parenthesized is true, which is the default, the expression will be enclosed in parentheses.

Implementation

SqlCase({
  Sql? baseSql,
  required Map<Sql, Sql> cases,
  Sql? elseSql,
  bool parenthesized = true,
}) : super._(SqlCase.compose(baseSql, cases, elseSql, parenthesized));