bugfix
This commit is contained in:
parent
cc9e37d644
commit
4101ffb5af
@ -345,13 +345,7 @@ class DBPools:
|
||||
kw['sor'] = sor
|
||||
try:
|
||||
desc = await func(dbname,NS,*args,**kw)
|
||||
total = await sor.record_count(desc,NS)
|
||||
recs = await sor.pagingdata(desc,NS)
|
||||
data = {
|
||||
"total":total,
|
||||
"rows":recs
|
||||
}
|
||||
return DictObject(**data)
|
||||
return await sor.runSQLPaging(desc,NS)
|
||||
except Exception as e:
|
||||
print('error',e)
|
||||
raise e
|
||||
|
@ -373,6 +373,15 @@ class SQLor(object):
|
||||
t = c.recs[0]['rcnt']
|
||||
return t
|
||||
|
||||
async def runSQLPaging(self,desc,NS):
|
||||
total = await self.record_count(desc,NS)
|
||||
recs = await self.pagingdata(desc,NS)
|
||||
data = {
|
||||
"total":total,
|
||||
"rows":recs
|
||||
}
|
||||
return DictObject(**data)
|
||||
|
||||
async def pagingdata(self,desc,NS):
|
||||
paging_desc = {}
|
||||
paging_desc.update(desc)
|
||||
|
Loading…
Reference in New Issue
Block a user