Skip to content
DocsTry Aspire
DocsTry

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

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the SurrealDB database.
propertydatabasesDict<string,string>get
A dictionary where the key is the resource name and the value is the database name.
propertynamespaceNamestringget
Gets the namespace name.
propertyparentSurrealDbServerResourceget
Gets the parent SurrealDB container resource.

Methods

methodaddDatabasebuilder
Adds a SurrealDB database resource to the application model
addDatabase(
name: string,
databaseName?: string): SurrealDbDatabaseResource
namestring
databaseNamestringoptional
SurrealDbDatabaseResource
methodwithCreationScriptbuilder
Defines the SQL script used to create the namespace.
withCreationScript(script: string): SurrealDbNamespaceResource
scriptstring
SurrealDbNamespaceResource