rho.duckdb implements the database-neutral rho.bio SQL generics for DuckDB. Queries return tasks, and declared read-only paths are checked before execution.
An asynchronous query
library(rho.async)
library(rho.bio)
library(rho.duckdb)
connection <- rho_duckdb_connect()
rows <- rho_sql_all(
connection,
"select * from (values ('TP53', 12), ('BRCA1', 8)) as genes(gene, samples)"
) |>
rho_await(timeout = 5000)
rho_duckdb_disconnect(connection)
rows
#> gene samples
#> 1 TP53 12
#> 2 BRCA1 8rho_assert_readonly_sql() rejects write, DDL, extension-loading, and attach statements on this path. The S7 connection class is the dispatch point, leaving room for other SQL backends without changing manifests or agent tools.
See the rho.duckdb reference and the upstream rho.bio contracts.