Skip to contents

Stops a server handle's Quack endpoint, stops a loaded native coordinator, and closes the DuckDB connection. Every step is attempted even if an earlier one fails, and the failures are raised together as canard_close_error.

Usage

ca_close(db)

Arguments

db

A handle returned by ca_open(), ca_serve(), or ca_connect().

Value

NULL, invisibly. Closing an already closed handle is harmless.

Details

After a statement on the connection has failed, DuckDB R holds the database, and its file lock, until R garbage-collects that statement; only then can another process open a file-backed database.