Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

SqlServerDatabaseResource

Handle
📦 Aspire.Hosting.SqlServer v17.0.0

A resource that represents a SQL Server database that is a child of a SQL Server container resource.

type SqlServerDatabaseResource interface {
ExpressionValue
Resource
ResourceWithConnectionString
ResourceWithParent
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the connection string expression for the SQL Server database.
ConnectionStringExpression() *ReferenceExpression
propertyDatabaseNamestringget
Gets the database name.
DatabaseName() (string, error)
propertyJdbcConnectionString*ReferenceExpressionget
Gets the JDBC connection string for the SQL Server database.
JdbcConnectionString() *ReferenceExpression
propertyParentSqlServerServerResourceget
Gets the parent SQL Server container resource.
Parent() SqlServerServerResource
propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)
propertyUriExpression*ReferenceExpressionget
Gets the connection URI expression for the SQL Server database.
UriExpression() *ReferenceExpression

Methods

methodWithCreationScriptbuilder
Defines the SQL script used to create the database.
WithCreationScript(script string) SqlServerDatabaseResource
scriptstringThe SQL script used to create the database.
SqlServerDatabaseResource

The resource builder.

Returns a handle; failures surface later via Err().