Python DBAPI 2.0 Compatibility
I figured it might be worth documenting some of the gaps that I've found while trying to build out the sqlalchemy driver for duckdb
The specification is available here: https://peps.python.org/pep-0249/
- [x]
descriptionthrows an exception instead of returning None when no result set is open (fixed in https://github.com/duckdb/duckdb/pull/1963) - [x]
descriptionis missing mandatorytype_codevalue (https://github.com/duckdb/duckdb/pull/1990) - [ ] missing
fetchmanymethod on cursor - [ ] Throw exceptions per standard, rather than using std::runtime_error for everything (working on this myself in https://github.com/duckdb/duckdb/pull/4075)
- [ ] Missing the extension
lastrowid(raised in https://github.com/duckdb/duckdb/issues/3976)
This is related to https://github.com/duckdb/duckdb/issues/469 as well
@Mause Yeah, I noticed this when I started trying to port the SQLite tests. I think there are two things in play, there's compatibility with the DB-API and compatibility with SQLite (which isn't completely conformant, and implements some of the extensions as well). I had a go at trying to build a pure Python wrapper which was more conformant, but I've unfortunately been waylaid with other things: https://github.com/thesketh/pyduckdb
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stale for 30 days with no activity.