mapToSqlLiteral method

  1. @override
String mapToSqlLiteral(
  1. GenerationContext context,
  2. DartT dartValue
)
override

Maps the dartValue to a SQL snippet that can be embedded as a literal into SQL queries generated by drift.

Implementation

@override
String mapToSqlLiteral(GenerationContext context, DartT dartValue) {
  if (context.dialect == SqlDialect.postgres) {
    return pg_mapping.mapToSqlLiteral(pgType, dartValue, typeName, codec);
  } else {
    return super.mapToSqlLiteral(context, dartValue);
  }
}