bugfix
This commit is contained in:
parent
23769535cd
commit
4abf30356e
17
sqlor/sor.py
17
sqlor/sor.py
@ -462,10 +462,8 @@ class SQLor(object):
|
|||||||
if 'page' in ns.keys():
|
if 'page' in ns.keys():
|
||||||
cnt = await self.record_count(sql, ns)
|
cnt = await self.record_count(sql, ns)
|
||||||
rows = await self.pagingdata(sql, ns)
|
rows = await self.pagingdata(sql, ns)
|
||||||
return {
|
d = DictObject(total=cnt, rows=rows)
|
||||||
'total': cnt,
|
return d
|
||||||
'rows': rows
|
|
||||||
}
|
|
||||||
ret = []
|
ret = []
|
||||||
async for r in self._get_data(sql, ns):
|
async for r in self._get_data(sql, ns):
|
||||||
ret.append(r)
|
ret.append(r)
|
||||||
@ -478,10 +476,8 @@ class SQLor(object):
|
|||||||
|
|
||||||
total = await self.record_count(sql,ns)
|
total = await self.record_count(sql,ns)
|
||||||
rows = await self.pagingdata(sql,ns)
|
rows = await self.pagingdata(sql,ns)
|
||||||
return {
|
d = DictObject(total=total, rows=rows)
|
||||||
'total':total,
|
return d
|
||||||
'rows':rows
|
|
||||||
}
|
|
||||||
|
|
||||||
async def tables(self):
|
async def tables(self):
|
||||||
sqlstring = self.tablesSQL()
|
sqlstring = self.tablesSQL()
|
||||||
@ -638,10 +634,7 @@ class SQLor(object):
|
|||||||
ns['sort'] = desc['summary'][0]['primary'][0]
|
ns['sort'] = desc['summary'][0]['primary'][0]
|
||||||
total = await self.record_count(sql, ns)
|
total = await self.record_count(sql, ns)
|
||||||
rows = await self.pagingdata(sql,ns)
|
rows = await self.pagingdata(sql,ns)
|
||||||
return {
|
return DictObject(total=total, rows=rows)
|
||||||
'total':total,
|
|
||||||
'rows':rows
|
|
||||||
}
|
|
||||||
else:
|
else:
|
||||||
if ns.get('sort'):
|
if ns.get('sort'):
|
||||||
sql = self.sortSQL(sql, ns)
|
sql = self.sortSQL(sql, ns)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user