summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/asyncpg.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/asyncpg.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/asyncpg.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/asyncpg.py b/lib/sqlalchemy/dialects/postgresql/asyncpg.py
index d198620d3..6827151f3 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
@@ -322,7 +327,7 @@ class AsyncpgNumeric(sqltypes.Numeric):
)
-class AsyncpgFloat(AsyncpgNumeric):
+class AsyncpgFloat(AsyncpgNumeric, sqltypes.Float):
__visit_name__ = "float"
render_bind_cast = True
@@ -987,6 +992,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,