BasaltConfig class final Getting Started

CLI configuration, loaded from basalt.yaml.

The database: section is kept as a raw map and handed to the backend adapter as-is — its keys are adapter-specific (path: for SQLite; url: or host:/port:/... for Postgres). If the DATABASE_URL environment variable is set it overrides the map's url key.

Constructors

BasaltConfig({required Map<String, Object?> database, required String backend, required String migrationsDir, required String schemaOutput, bool nativeTypes = false, SchemaTypeOverrides typeOverrides = const SchemaTypeOverrides.empty()})
const

Properties

backend String
Backend package name from the required backend: key (e.g. basalt_sqlite). Choosing a backend is an explicit decision — there is no default.
final
database Map<String, Object?>
Raw database: section — connection options interpreted by the adapter.
final
hashCode int
The hash code for this object.
no setterinherited
migrationsDir String
final
nativeTypes bool
Whether generate-schema applies the adapter's backend-native type presets (native_types: in basalt.yaml, default false).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemaOutput String
final
typeOverrides SchemaTypeOverrides
Column-type overrides for generate-schema, from the optional types: block of basalt.yaml. Layered over the adapter's presets.
final

Methods

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

Static Methods

load({Map<String, String>? environment, String configPath = 'basalt.yaml'}) BasaltConfig