# CommunityToolkit.Aspire.Hosting.SurrealDb

- Module: `CommunityToolkit.Aspire.Hosting.SurrealDb`
- Version: `13.4.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)
- Functions: `11`
- Types: `3`

## Types

- [SurrealDbDatabaseResource](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/surrealdbdatabaseresource.md) -- `handle` - 4 members -- A resource that represents a SurrealDB database that is a child of a SurrealDB namespace resource.
- [SurrealDbNamespaceResource](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/surrealdbnamespaceresource.md) -- `handle` - 6 members -- A resource that represents a SurrealDB namespace that is a child of a SurrealDB container resource.
- [SurrealDbServerResource](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/surrealdbserverresource.md) -- `handle` - 15 members -- A resource that represents a SurrealDB container.

## Functions

- [addDatabase](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/adddatabase.md) -- `method` -- Adds a SurrealDB database resource to the application model
- [addNamespace](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/addnamespace.md) -- `method` -- Adds a SurrealDB namespace resource to the application model
- [addSurrealServer](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/addsurrealserver.md) -- `method` -- Adds a SurrealDB resource to the application model. A container is used for local development. The default image is and the tag is .
- [withCreationScript](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withcreationscript.md) -- `method` -- Defines the SQL script used to create the namespace.
- [withCreationScript](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withcreationscript.md) -- `method` -- Defines the SQL script used to create the database.
- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a SurrealDB resource.
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a SurrealDB resource.
- [withInitFiles](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withinitfiles.md) -- `method` -- Copies init files into a SurrealDB container resource.
- [withLogLevel](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withloglevel.md) -- `method`
- [withSurrealDbOtlpExporter](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withsurrealdbotlpexporter.md) -- `method` -- Injects the appropriate environment variables to allow the resource to enable sending telemetry to the dashboard. 1. It sets the OTLP endpoint to the value of the DOTNET_DASHBOARD_OTLP_ENDPOINT_URL environment variable. 2. It sets the service name and instance id to the resource name and UID. Values are injected by the orchestrator. 3. It sets a small batch schedule delay in development. This reduces the delay that OTLP exporter waits to sends telemetry and makes the dashboard telemetry pages responsive.
- [withSurrealist](/reference/api/typescript/communitytoolkit.aspire.hosting.surrealdb/withsurrealist.md) -- `method`
