ibis icon indicating copy to clipboard operation
ibis copied to clipboard

feat(duckdb): improve attach(), detach(), and attach_sqlite()

Open NickCrews opened this issue 6 months ago • 0 comments

The sqlite_attach() approach is deprecated per https://duckdb.org/docs/stable/extensions/sqlite.html, and the newer syntax opens up read only flag, specifiying a name for the attachment, and not overwriting tables that already exist.

This is breaking:

  • some params are now keyword-only
  • the semantics for attach_sqlite(overwrite: bool) have changed, now it is on_exists: Literal["ignore", "error"] = "error"

This is prep for work I want to do to add attach_postgres(), but I want to get the API up to date so that the two APIs can be consistent. In fact, after this PR I don't even need another attach_postgres() method, since now the plain attach() is flexible enough to support this.

NickCrews avatar May 09 '25 00:05 NickCrews