Map a value from an object in Dart into something that will be understood by the database.
@override int toSql(T value) { return value.index; }