TypeOverride class final CLI Adapters & Tooling

One resolved column-type override for generate-schema: the exact Dart type and SqlType constructor expression to emit, plus an optional import the generated file needs for a custom symbol.

Register the non-nullable form; a nullable column derives its variant automatically via asNullable (wrapping the codec in NullableSqlType), so there is no separate nullable registration.

Both dartType and sqlType are written verbatim; in particular dartType must equal the SqlType's T — the generator cannot verify that against the user's package.

Constructors

TypeOverride({required String dartType, required String sqlType, String? import})
const

Properties

dartType String
The Dart field type as written, e.g. Map<String, Object?>.
final
hashCode int
The hash code for this object.
no setterinherited
import String?
Import URI the generated schema needs for the override's symbols, or null when they are already exported by package:basalt/basalt.dart.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sqlType String
The SqlType constructor expression as written, e.g. JsonMapSqlType().
final

Methods

asNullable() TypeOverride
The nullable variant of this override: the Dart type gains ? and the codec is wrapped in NullableSqlType. The import is unchanged (NullableSqlType comes from package:basalt/basalt.dart).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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