Skip to contents

Opens a workflow database in this process, installing schema version 1 or checking the existing one. The handle owns its DBI connection; close it with ca_close(). Extensions are never downloaded, and the DuckDB home is session-private. A file-backed database has one owning process: others reach it through a Quack server instead of opening the file.

Usage

ca_open(path = ":memory:", allow_unsigned_extensions = FALSE)

Arguments

path

DuckDB database path, or ":memory:".

allow_unsigned_extensions

Development-only opt-in for loading an unsigned build of the native coordinator. It lets any SQL on this database load arbitrary native code into the owning process. On a served database, that includes every Quack token holder. Leave it FALSE in deployments.

Value

An S7 CanardConnection handle.

Examples

db <- ca_open()
id <- ca_spawn(db, "sum", list(x = 2, y = 3))
ca_work(db, list(sum = function(input, ctx) input$x + input$y), max_tasks = 1)
ca_inspect(db, id)$result
#> [1] 5
ca_close(db)