def connect(self):
await self.instance.db.connect()
await self.instance.apps.discover()
await self.instance.db.initiate()
if self.db_type != 'mysql':
raise Exception('We only support mysql converting right now!')
self.connection = pymysql.connect(
host=self.db_host, user=self.db_user, password=self.db_password, db=self.db_name, charset=self.charset,
port=self.db_port or 3306,
cursorclass=pymysql.cursors.DictCursor
)
评论列表
文章目录