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

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, {required Directory baseDirectory}) 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.