SurrealDbDatabaseResource

Handle
📦 CommunityToolkit.Aspire.Hosting.SurrealDb v13.6.1

A resource that represents a SurrealDB database that is a child of a SurrealDB namespace resource.

type SurrealDbDatabaseResource interface {
ExpressionValue
Resource
ResourceWithConnectionString
ResourceWithParent
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the connection string expression for the SurrealDB database.
ConnectionStringExpression() *ReferenceExpression
propertyDatabaseNamestringget
Gets the database name.
DatabaseName() (string, error)
propertyParentSurrealDbNamespaceResourceget
Gets the parent SurrealDB namespace resource.
Parent() SurrealDbNamespaceResource

Methods

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

A reference to the IResourceBuilder.

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