PostgresDatabaseConfig class

PostgreSQL-specific database configuration.

Inheritance

Constructors

PostgresDatabaseConfig({required String host, required int port, required String user, required String password, required String name, bool requireSsl = false, bool isUnixSocket = false, List<String>? searchPaths, int? maxConnectionCount = defaultMaxConnectionCount, String? dataPath})
Creates a new PostgresDatabaseConfig.
PostgresDatabaseConfig.embedded({required String dataPath, String user = 'postgres', required String name, int? maxConnectionCount})
Creates a config for an embedded PostgreSQL launched in dataPath.

Properties

dataPath → String?
PGDATA directory for embedded PostgreSQL (serverpod_embedded_postgres).
final
dialect → DatabaseDialect
Database dialect.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
host → String
Database host.
finalinherited
isUnixSocket → bool
True if the database is running on a unix socket.
finalinherited
maxConnectionCount → int?
The maximum number of connections in the database pool.
finalinherited
name → String
Database name.
finalinherited
password → String
Database password.
finalinherited
port → int
Database port.
finalinherited
requireSsl → bool
True if the database requires an SSL connection.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
searchPaths → List<String>?
Override the search path all connections to the database.
finalinherited
user → String
Database user name.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
withName(String name) → PostgresDatabaseConfig
Returns a copy of this config that targets the database name, keeping every other setting (including the connection mode).
withResolvedLocalPath(String baseDirectory) → PostgresDatabaseConfig
Returns this config with a relative dataPath resolved against baseDirectory.
override

Operators

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