How to enable READ_WRITE acces mode when attaching a duckdb file with DuckDBClient? #1823
-
When loading a duckdb database with DuckDBClient access mode is hardcoded to be READ_ONLY: https://github.com/observablehq/framework/blob/main/src/client/stdlib/duckdb.js#L286 Is there a way to open it in READ_WRITE mode? Also is there a way to set the search_path that persists across queries?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Tried to manually attach the file like this:
now it throws: |
Beta Was this translation helpful? Give feedback.
-
I found a solution. I copy the read only database into the memory db: ---
sql:
base: data/database.db
--- await sql`
use memory;
copy from database base to memory;
detach base` |
Beta Was this translation helpful? Give feedback.
I found a solution. I copy the read only database into the memory db: