Expression<T extends Object>.custom constructor

Expression<T extends Object>.custom(
  1. String sql, {
  2. Map<KnownSqlDialect, String> dialectSpecific = const {},
  3. Precedence precedence = Precedence.unknown,
  4. SqlType<T>? customType,
})

A custom expression that can appear in a sql statement.

The sql will be written into the query without any modification, and can be combined with dialectSpecific overrides.

Implementation

factory Expression.custom(
  String sql, {
  Map<KnownSqlDialect, String> dialectSpecific = const {},
  Precedence precedence = Precedence.unknown,
  SqlType<T>? customType,
}) {
  return Expression.customComponent(
    CustomComponent(sql, dialectSpecificSql: dialectSpecific),
    precedence: precedence,
    customType: customType,
  );
}