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.

Functions

embeddedPostgresListensOnTcp(PostgresDatabaseConfig config) → bool
Whether the embedded postmaster for config also listens on loopback TCP.
embeddedPostgresTcpAddress(DatabasePoolManager poolManager) → Uri?
The loopback TCP URI of the embedded database behind poolManager, without its password, or null when it serves no TCP listener.
embeddedPostgresTcpPasswordAuthenticates(EmbeddedPostgres handle) → Future<bool>
Whether the password on handle's TCP endpoint authenticates against the running database, or true when it serves no TCP listener.
embeddedTransportFor(PostgresDatabaseConfig config) → Transport
How the embedded postmaster for config listens.
forceStopDatabasePool(DatabasePoolManager poolManager) → Future<void>
Stops poolManager without 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 error should 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's dataPath, returning its resolved connection coordinates.

Exceptions / Errors

EmbeddedPostgresStartupException
An embedded database startup failure that has already been translated into user-facing guidance.