mapToVariable method
Maps a Dart object to a (possibly simpler) object that can be used as parameters to raw sql queries.
Implementation
Object? mapToVariable(Object? dart) {
if (dart == null) return null;
// These need special handling, all other types are a direct mapping
if (dart is DateTime) return const DateTimeType().mapToSqlVariable(dart);
if (dart is bool) return const BoolType().mapToSqlVariable(dart);
return dart;
}