bugfix
This commit is contained in:
parent
0a75d57225
commit
2708692f17
@ -1,7 +0,0 @@
|
|||||||
from .mysqlor import MySqlor
|
|
||||||
|
|
||||||
class AioMysqlor(MySqlor):
|
|
||||||
@classmethod
|
|
||||||
def isMe(self,name):
|
|
||||||
return name=='aiomysql'
|
|
||||||
|
|
||||||
@ -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()
|
||||||
|
|||||||
@ -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')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user