PostgresAdapter constructor

PostgresAdapter({
  1. required String host,
  2. required String database,
  3. String? username,
  4. String? password,
  5. int port = 5432,
  6. int maxConnections = 10,
})

Creates a PostgresAdapter with the specified connection settings.

Implementation

PostgresAdapter({
  required String host,
  required String database,
  String? username,
  String? password,
  int port = 5432,
  int maxConnections = 10,
}) : _pool = Pool.withEndpoints(
        [
          Endpoint(
            host: host,
            database: database,
            username: username,
            password: password,
            port: port,
          )
        ],
        settings: PoolSettings(maxConnectionCount: maxConnections),
      );