This commit is contained in:
yumoqing 2026-06-01 16:31:33 +08:00
parent 23769535cd
commit 4abf30356e

View File

@ -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)