diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2023-05-09 14:31:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2023-05-09 14:31:19 +0000 |
commit | a517e14ee4c44488a2a765c588fa9a2a440b0662 (patch) | |
tree | b405f10103d812071eb21296d0c4888d2c7ba066 /lib/sqlalchemy/dialects | |
parent | 89c8688d71961522faa69e0780738ff86c8c76e5 (diff) | |
parent | 667a9ca21417f5ae9d2c5bd031506cf40c8e5909 (diff) | |
download | sqlalchemy-a517e14ee4c44488a2a765c588fa9a2a440b0662.tar.gz |
Merge "add bind casts for BYTEA on asyncpg" into main
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/asyncpg.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/asyncpg.py b/lib/sqlalchemy/dialects/postgresql/asyncpg.py index c879205e4..3f33600f9 100644 --- a/lib/sqlalchemy/dialects/postgresql/asyncpg.py +++ b/lib/sqlalchemy/dialects/postgresql/asyncpg.py @@ -182,6 +182,7 @@ from .base import PGExecutionContext from .base import PGIdentifierPreparer from .base import REGCLASS from .base import REGCONFIG +from .types import BYTEA from ... import exc from ... import pool from ... import util @@ -212,6 +213,10 @@ class AsyncpgTime(sqltypes.Time): render_bind_cast = True +class AsyncpgByteA(BYTEA): + render_bind_cast = True + + class AsyncpgDate(sqltypes.Date): render_bind_cast = True @@ -986,6 +991,7 @@ class PGDialect_asyncpg(PGDialect): sqltypes.Numeric: AsyncpgNumeric, sqltypes.Float: AsyncpgFloat, sqltypes.JSON: AsyncpgJSON, + sqltypes.LargeBinary: AsyncpgByteA, json.JSONB: AsyncpgJSONB, sqltypes.JSON.JSONPathType: AsyncpgJSONPathType, sqltypes.JSON.JSONIndexType: AsyncpgJSONIndexType, |