# DuckDBResource

- Module: [CommunityToolkit.Aspire.Hosting.DuckDB](/reference/api/typescript/communitytoolkit.aspire.hosting.duckdb.md)
- Version: `13.5.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1)

## Definition

```typescript
interface DuckDBResource
  extends IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IValueProvider,
    IValueWithReferences {
  withReadOnly(): DuckDBResource;
}
```

## Methods

- [withReadOnly](/reference/api/typescript/communitytoolkit.aspire.hosting.duckdb/duckdbresource/withreadonly.md) -- `method` -- Configures the DuckDB resource to open the database in read-only mode.
    ```typescript
  withReadOnly(): DuckDBResource
  ```
