PostgresDatabaseResource
Handle
interface PostgresDatabaseResource extends IExpressionValue, IManifestExpressionProvider, IResource, IResourceWithConnectionString, IResourceWithParent, PostgresServerResource]], IValueProvider, IValueWithReferences { readonly connectionStringExpression: ReferenceExpression; readonly databaseName: string; readonly jdbcConnectionString: ReferenceExpression; readonly parent: PostgresServerResource; readonly resourceTypeDisplayName: string; readonly uriExpression: ReferenceExpression; withCreationScript(script: string): PostgresDatabaseResource; withPostgresMcp(configureContainer?: (obj: PostgresMcpContainerResource) => Promise<void>, containerName?: string): PostgresDatabaseResource;}8 members
Properties
property
connectionStringExpression ReferenceExpression getGets the connection string expression for the Postgres database.
property
databaseName stringgetGets the database name.
property
jdbcConnectionString ReferenceExpression getGets the JDBC connection string for the PostgreSQL database.
property
parentPostgresServerResource getGets the parent PostgresSQL container resource.
property
resourceTypeDisplayName stringgetGets the ResourceTypeDisplayName property
property
uriExpression ReferenceExpression getGets the connection URI expression for the PostgreSQL database.
Methods
Defines the SQL script used to create the database.
withCreationScript(script: string): PostgresDatabaseResourceParameters
scriptstringThe SQL script used to create the database.Returns
PostgresDatabaseResource Adds a Postgres MCP server container and configures it to connect to the database represented by `builder`.
withPostgresMcp(configureContainer?: (obj: PostgresMcpContainerResource) => Promise<void>, containerName?: string): PostgresDatabaseResourceParameters
configureContainer (obj: PostgresMcpContainerResource) => Promise<void> optionalConfiguration callback for the Postgres MCP container resource.containerName stringoptionalThe name of the container (optional).Returns
PostgresDatabaseResource