mapToSqlParameter method

  1. @override
Object mapToSqlParameter(
  1. GenerationContext context,
  2. DartT dartValue
)
override

Maps the dartValue to a value understood by the underlying database driver.

Implementation

@override
Object mapToSqlParameter(GenerationContext context, DartT dartValue) {
  if (context.dialect == SqlDialect.postgres) {
    return pg_mapping.mapToSql(pgType, dartValue);
  } else {
    return super.mapToSqlParameter(context, dartValue);
  }
}