open method

  1. @override
Future<Connection> open(
  1. Map<String, Object?> options
)

Opens a live connection described by options — the raw database: section of basalt.yaml, passed through as-is.

The adapter defines its own option keys and validates them: an unknown key or a missing required one throws ArgumentError with a message that names the adapter.

Implementation

@override
Future<Connection> open(Map<String, Object?> options) {
  final endpoint = PostgresEndpoint.fromOptions(options);
  return PostgresConnection.open(
    host: endpoint.host,
    port: endpoint.port,
    database: endpoint.database,
    username: endpoint.username,
    password: endpoint.password,
    ssl: endpoint.ssl,
  );
}