expression method

String expression(
  1. SqlDialect dialect
)

Returns the target expression or throws if that dialect was not declared.

Implementation

String expression(SqlDialect dialect) => switch (dialect) {
  SqlDialect.sqlite => sqlite,
  SqlDialect.postgres => postgres,
  SqlDialect.mysql =>
    mysql ??
        (throw const OrmException(
          'SCHEMA.DIALECT',
          'Declare the MySQL expression explicitly.',
        )),
  SqlDialect.mariadb =>
    mariadb ??
        (throw const OrmException(
          'SCHEMA.DIALECT',
          'Declare the MariaDB expression explicitly.',
        )),
};