# DuckDBResource

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

## 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
  ```
