embedded library
Server-only entry point for launching embedded PostgreSQL.
Kept out of the main serverpod_database.dart barrel so that web clients
never pull package:serverpod_embedded_postgres and its dart:ffi
dependencies into the compile graph. Import this only from server-side code.
Classes
Functions
-
embeddedPostgresListensOnTcp(
PostgresDatabaseConfig config) → bool -
Whether the embedded postmaster for
configalso listens on loopback TCP. -
embeddedPostgresTcpAddress(
DatabasePoolManager poolManager) → Uri? -
The loopback TCP URI of the embedded database behind
poolManager, without its password, ornullwhen it serves no TCP listener. -
embeddedPostgresTcpPasswordAuthenticates(
EmbeddedPostgres handle) → Future< bool> -
Whether the password on
handle's TCP endpoint authenticates against the running database, ortruewhen it serves no TCP listener. -
embeddedTransportFor(
PostgresDatabaseConfig config) → Transport -
How the embedded postmaster for
configlistens. -
forceStopDatabasePool(
DatabasePoolManager poolManager) → Future< void> -
Stops
poolManagerwithout waiting for queries still running. -
formatEmbeddedPostgresFailure(
Object error) → String - Converts an embedded PostgreSQL startup failure into guidance for a Serverpod user.
-
shouldReportEmbeddedPostgresFailure(
Object error) → bool -
Whether
errorshould be accompanied by its diagnostic details and stack trace when shown to a Serverpod user for issue reporting. -
startOrAttachEmbeddedPostgres(
PostgresDatabaseConfig config) → Future< ResolvedEmbeddedPostgres?> -
Launches or attaches to the embedded PostgreSQL postmaster backing
config'sdataPath, returning its resolved connection coordinates.
Exceptions / Errors
- EmbeddedPostgresStartupException
- An embedded database startup failure that has already been translated into user-facing guidance.