]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add missing SmallInteger column spec for asyncpg; Fixes: #12170
authorFeeeeK <26704473+FeeeeK@users.noreply.github.com>
Mon, 9 Dec 2024 23:29:55 +0000 (02:29 +0300)
committerFeeeeK <26704473+FeeeeK@users.noreply.github.com>
Mon, 9 Dec 2024 23:29:55 +0000 (02:29 +0300)
lib/sqlalchemy/dialects/postgresql/asyncpg.py

index d57c94a170f9c3d085be8cc4e8ba9a473b808b27..c3bc7b3bdb9078b4c586bc8cd2bfbd7ceb649009 100644 (file)
@@ -281,6 +281,8 @@ class AsyncPgEnum(ENUM):
 class AsyncpgInteger(sqltypes.Integer):
     render_bind_cast = True
 
+class AsyncpgSmallInteger(sqltypes.SmallInteger):
+    render_bind_cast = True
 
 class AsyncpgBigInteger(sqltypes.BigInteger):
     render_bind_cast = True
@@ -1078,6 +1080,7 @@ class PGDialect_asyncpg(PGDialect):
             INTERVAL: AsyncPgInterval,
             sqltypes.Boolean: AsyncpgBoolean,
             sqltypes.Integer: AsyncpgInteger,
+            sqltypes.SmallInteger: AsyncpgSmallInteger,
             sqltypes.BigInteger: AsyncpgBigInteger,
             sqltypes.Numeric: AsyncpgNumeric,
             sqltypes.Float: AsyncpgFloat,