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