PostgresDatabaseResource
Handle
A resource that represents a PostgreSQL database. This is a child resource of a Postgres.
type PostgresDatabaseResource interface { ExpressionValue Resource ResourceWithConnectionString ResourceWithParent}8 members
Properties
property
ConnectionStringExpression *ReferenceExpression getGets the connection string expression for the Postgres database.
ConnectionStringExpression() *ReferenceExpressionproperty
DatabaseName stringgetGets the database name.
DatabaseName() (string, error)property
JdbcConnectionString *ReferenceExpression getGets the JDBC connection string for the PostgreSQL database.
JdbcConnectionString() *ReferenceExpressionproperty
ParentPostgresServerResource getGets the parent PostgresSQL container resource.
Parent() PostgresServerResourceproperty
ResourceTypeDisplayName stringgetGets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)property
UriExpression *ReferenceExpression getGets the connection URI expression for the PostgreSQL database.
UriExpression() *ReferenceExpressionMethods
Defines the SQL script used to create the database.
WithCreationScript(script string) PostgresDatabaseResourceParameters
scriptstringThe SQL script used to create the database.Returns
PostgresDatabaseResource The resource builder.
Returns a handle; failures surface later via Err().
Adds a Postgres MCP server container and configures it to connect to the database represented by
builder.WithPostgresMcp(options ...*WithPostgresMcpOptions) PostgresDatabaseResourceParameters
options...*WithPostgresMcpOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithPostgresMcpOptions argument.
ConfigureContainer func(obj PostgresMcpContainerResource) callbackConfiguration callback for the Postgres MCP container resource.ContainerName *stringThe name of the container (optional).Returns
PostgresDatabaseResource The resource builder.
Returns a handle; failures surface later via Err().