SchemaTypeOverrides class final CLI Adapters & Tooling

Column-type customization for generate-schema, from the types: block of basalt.yaml (parsed by SchemaTypeOverridesParser) and/or a backend adapter's presets.

Overrides are matched per column with the precedence specific column > native type > canonical type, each falling back to the generator's built-in mapping. Only the non-nullable form is registered; nullable columns derive their variant automatically (see TypeOverride.asNullable). Combine a user layer with an adapter preset via overlay.

Constructors

SchemaTypeOverrides({Map<String, TypeOverride> byColumn = const {}, Map<String, TypeOverride> byNative = const {}, Map<ColumnType, TypeOverride> byCanonical = const {}})
const
SchemaTypeOverrides.empty()
No overrides — every column uses the generator's built-in type mapping.
const

Properties

byCanonical Map<ColumnType, TypeOverride>
Overrides keyed by canonical ColumnType.
final
byColumn Map<String, TypeOverride>
Overrides keyed by "table.column".
final
byNative Map<String, TypeOverride>
Overrides keyed by normalized native type (see normalizeNativeType).
final
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether no overrides are configured.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overlay(SchemaTypeOverrides base) SchemaTypeOverrides
Returns a copy where this set takes precedence over base: at each level, this map's entries win per key, and base's remaining entries are kept.
resolve(String table, IntrospectedColumn column) TypeOverride?
The override for column of table, or null to use the built-in mapping.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited