[DRAFT] SA20: Add compatibility adapters for psycopg3 and asyncpg dialects#532
[DRAFT] SA20: Add compatibility adapters for psycopg3 and asyncpg dialects#532
Conversation
It introduces the `crate+psycopg://`, `crate+asyncpg://`, and `crate+urllib3://` dialect identifiers. The asynchronous variant of `psycopg` is also supported.
Backlog1. Missing test casesC'est la vie. Please use the provided example programs until we have them. 2. Still using PGDDLCompilerThere is more work to do, to make the hybrid dialect use the sa.Column("x", sa.Integer, primary_key=True, autoincrement=True)CREATE TABLE testdrive (
x SERIAL NOT NULL,
y INT,
PRIMARY KEY (x)
)sqlalchemy.exc.InternalError: (psycopg.errors.InternalError_) Cannot find data type: serial3. Error
|
|
This patch has been replaced by two others. |
About
The idea is to unlock the CrateDB dialect for SQLAlchemy with the psycopg3 and asyncpg drivers by introducing corresponding
crate+psycopg://,crate+asyncpg://, andcrate+urllib3://dialect identifiers.The asynchronous variant of
psycopgis also supported and will be automatically selected when usingcreate_async_engine()instead ofcreate_engine().Installation
Examples
Those example programs exercise basic conversations using the specified drivers.
References