nativeTypeOverrides property
Backend-native generate-schema presets, applied only when the project
opts in with native_types: true in basalt.yaml.
May map to SqlTypes shipped by the backend package; the generated
schema then imports that package and is no longer backend-portable.
Implementation
@override
SchemaTypeOverrides get nativeTypeOverrides => const SchemaTypeOverrides(
byNative: {
'json': _jsonOverride,
'jsonb': _jsonOverride,
'uuid': _uuidOverride,
'numeric': _numericOverride,
'decimal': _numericOverride,
// Arrays: `information_schema` reports `data_type = ARRAY`, so
// introspection keys array columns by their `udt_name` (the element
// type with a leading underscore, e.g. `_int4` for `integer[]`).
'_int2': _intArrayOverride,
'_int4': _intArrayOverride,
'_int8': _intArrayOverride,
'_float4': _doubleArrayOverride,
'_float8': _doubleArrayOverride,
'_bool': _boolArrayOverride,
'_text': _stringArrayOverride,
'_varchar': _stringArrayOverride,
'_bpchar': _stringArrayOverride,
'_uuid': _stringArrayOverride,
'_numeric': _stringArrayOverride,
},
);