Skip to content
Docs Try Aspire
Docs Try

SurrealDbNamespaceResource

Handle
📦 CommunityToolkit.Aspire.Hosting.SurrealDb v13.4.0
interface SurrealDbNamespaceResource
extends IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithConnectionString,
IResourceWithParent,
SurrealDbServerResource]],
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly databases: Dict<string,string>;
readonly namespaceName: string;
readonly parent: SurrealDbServerResource;
addDatabase(
name: string,
databaseName?: string): SurrealDbDatabaseResource;
withCreationScript(script: string): SurrealDbNamespaceResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the connection string expression for the SurrealDB database.
property databases Dict<string,string> get
A dictionary where the key is the resource name and the value is the database name.
property namespaceName string get
Gets the namespace name.
property parent SurrealDbServerResource get
Gets the parent SurrealDB container resource.

Methods

method addDatabase builder
Adds a SurrealDB database resource to the application model
addDatabase(
name: string,
databaseName?: string): SurrealDbDatabaseResource
name string
databaseName string optional
SurrealDbDatabaseResource
method withCreationScript builder
Defines the SQL script used to create the namespace.
withCreationScript(script: string): SurrealDbNamespaceResource
script string
SurrealDbNamespaceResource