This commit is contained in:
yumoqing 2025-10-19 20:04:45 +08:00
parent 0a75d57225
commit 2708692f17
3 changed files with 3 additions and 11 deletions

View File

@ -1,7 +0,0 @@
from .mysqlor import MySqlor
class AioMysqlor(MySqlor):
@classmethod
def isMe(self,name):
return name=='aiomysql'

View File

@ -180,9 +180,10 @@ order by
port: port:
""" """
kwargs = self.dbdesc kwargs = self.dbdesc
self.conn = await self.connect(**kwargs) dns = ' '.join([f'{k}={v}' for k, v in kwargs.items()])
self.conn = await self.connect(dns)
self.cur = await self.conn.cursor() self.cur = await self.conn.cursor()
self.dbname = kwargs['dbname'] self.dbname = kwargs.dbname.lower()
async def close(): async def close():
await self.cur.close() await self.cur.close()

View File

@ -477,7 +477,6 @@ class SQLor(object):
async for r in self._get_data(sqlstring,{}): async for r in self._get_data(sqlstring,{}):
r.name = r.name.lower() r.name = r.name.lower()
ret.append(r) ret.append(r)
debug(f'{sqlstring=}, {ret=}')
return ret return ret
def indexesSQL(self,tablename): def indexesSQL(self,tablename):
@ -541,7 +540,6 @@ class SQLor(object):
return desc return desc
desc = {} desc = {}
tables = await self.tables() tables = await self.tables()
debug(f'{tables=}')
summary = [i for i in tables if tablename == i.name] summary = [i for i in tables if tablename == i.name]
if not summary: if not summary:
e = Exception(f'table({tablename}) not exist') e = Exception(f'table({tablename}) not exist')