connect method

  1. @override
Future<void> connect()
override

Opens a connection to the PostgreSQL database using the configured endpoint.

SSL is disabled by default. Modify ConnectionSettings if needed.

Implementation

@override
Future<void> connect() async {
  _connection = await Connection.open(
    Endpoint(
      host: config.host,
      database: config.database,
      port: config.port,
      username: config.username,
      password: config.password,
    ),
    settings: ConnectionSettings(sslMode: SslMode.disable),
  );
}