enumTypeToSQLType method
MapEntry<String, List<String> > ?
enumTypeToSQLType(
- Type type,
- String column, {
- List<
EntityField> ? entityFieldAnnotations,
Returns: ENUM: valuesNames
Implementation
MapEntry<String, List<String>>? enumTypeToSQLType(Type type, String column,
{List<EntityField>? entityFieldAnnotations}) {
var reflectionFactory = ReflectionFactory();
var enumReflection = reflectionFactory.getRegisterEnumReflection(type);
if (enumReflection != null) {
var valuesNames = enumReflection.valuesByName.keys.toList()..sort();
return MapEntry('ENUM', valuesNames);
}
return null;
}