BasaltAdapter class abstract base CLI Adapters & Tooling

A database backend plugged into the basalt CLI.

The CLI never imports concrete backends: basalt.yaml's backend: key names a package, and the generated bootstrap entrypoint imports that package's lib/adapter.dart, which by convention exposes a top-level const BasaltAdapter adapter;.

The adapter owns everything backend-specific the CLI needs: opening a Connection from the raw database: options, destroying the database for database reset, and the type presets consulted by generate-schema.

Constructors

BasaltAdapter()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
Short backend name for diagnostics, e.g. 'sqlite'.
no setter
nativeTypeOverrides SchemaTypeOverrides
Backend-native generate-schema presets, applied only when the project opts in with native_types: true in basalt.yaml.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeOverrides SchemaTypeOverrides
Always-applied generate-schema presets.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(Map<String, Object?> options) Future<Connection>
Opens a live connection described by options — the raw database: section of basalt.yaml, passed through as-is.
reset(Map<String, Object?> options) Future<void>
Destroys the database described by options so database reset can rebuild it from scratch by re-running migrations.
toString() String
A string representation of this object.
inherited

Operators

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