Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddDuckDB

Method
📦 CommunityToolkit.Aspire.Hosting.DuckDB v13.6.1
func (DistributedApplicationBuilder) AddDuckDB(
name string,
options ...*AddDuckDBOptions,
) DuckDBResource

Signature

methodAddDuckDBbuilder
Adds a DuckDB resource to the application builder.
AddDuckDB(
name string,
options ...*AddDuckDBOptions,
) DuckDBResource
namestringThe name of the resource.
options...*AddDuckDBOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddDuckDBOptions argument.

DatabasePath*stringThe optional path to the database file. If no path is provided the database is stored in a temporary location.
DatabaseFileName*stringThe filename of the database file. Must include extension. If no file name is provided, a randomly generated file name is used.
DuckDBResource

A resource builder for the DuckDB resource.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder