File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import aiomysql
99from sqlalchemy import util , exc , sql
1010from sqlalchemy .dialects .mysql import (JSON , ENUM )
11- # from sqlalchemy.dialects.postgresql import ( # noqa: F401
12- # ARRAY,
13- # CreateEnumType,
14- # DropEnumType,
15- # JSON,
16- # JSONB,
17- # json,
18- # )
1911from sqlalchemy .dialects .mysql .base import (
2012 MySQLCompiler ,
2113 MySQLDialect ,
5042
5143class AiomysqlDBAPI (base .BaseDBAPI ):
5244 paramstyle = "format"
53- # Error = asyncpg.PostgresError, asyncpg.InterfaceError
54-
55-
56- # class AiomysqlCompiler(PGCompiler):
57- # @property
58- # def bindtemplate(self):
59- # return self._bindtemplate
60- #
61- # @bindtemplate.setter
62- # def bindtemplate(self, val):
63- # # noinspection PyAttributeOutsideInit
64- # self._bindtemplate = val.replace(":", "$")
65- #
66- # def _apply_numbered_params(self):
67- # if hasattr(self, "string"):
68- # return super()._apply_numbered_params()
6945
7046
7147# noinspection PyAbstractClass
@@ -353,6 +329,7 @@ async def rollback(self):
353329 await self ._conn .rollback ()
354330
355331
332+ # MySQL doesn't need to create ENUM types like PostgreSQL, do nothing here
356333class AsyncEnum (ENUM ):
357334 async def create_async (self , bind = None , checkfirst = True ):
358335 pass
You can’t perform that action at this time.
0 commit comments