bugfix
This commit is contained in:
parent
08ffd2ef08
commit
0a75d57225
17
sqlor/sor.py
17
sqlor/sor.py
@ -443,13 +443,20 @@ class SQLor(object):
|
|||||||
return await self.execute(desc,NS,None)
|
return await self.execute(desc,NS,None)
|
||||||
|
|
||||||
async def sqlExe(self, sql, ns):
|
async def sqlExe(self, sql, ns):
|
||||||
ret = []
|
|
||||||
r = await self.execute(sql,ns,
|
|
||||||
callback=lambda x:ret.append(x))
|
|
||||||
sqltype = self.getSqlType(sql)
|
sqltype = self.getSqlType(sql)
|
||||||
if sqltype == 'dml':
|
if sqltype != 'qry':
|
||||||
|
r = await self.execute(sql, ns)
|
||||||
return r
|
return r
|
||||||
|
if 'page' in ns.keys():
|
||||||
|
cnt = await self.record_count(sql, ns)
|
||||||
|
rows = await self.pagingdata(sql, ns)
|
||||||
|
return {
|
||||||
|
'total': cnt,
|
||||||
|
'rows': rows
|
||||||
|
}
|
||||||
|
ret = []
|
||||||
|
async for r in self._get_data(sql, ns):
|
||||||
|
ret.append(r)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
async def sqlPaging(self,sql,ns):
|
async def sqlPaging(self,sql,ns):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user