From 89a9756b0022686a258a9d87f81b9a979fa16f8c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 19 Oct 2025 17:04:42 +0800 Subject: [PATCH] bugfix --- sqlor/sor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sqlor/sor.py b/sqlor/sor.py index 43e0b2c..2cec090 100755 --- a/sqlor/sor.py +++ b/sqlor/sor.py @@ -172,7 +172,7 @@ class SQLor(object): return self.cur def recordCnt(self,sql): - ret = u"""select count(*) rcnt from (%s) rowcount_table""" % sql + ret = """select count(*) rcnt from (%s) rowcount_table""" % sql return ret def sortSQL(self, sql, NS): @@ -307,9 +307,13 @@ class SQLor(object): async def fetchone(self, cur): if inspect.iscoroutinefunction(cur.fetchone): - return await cur.fetchone() + ret = await cur.fetchone() + debug(f'coro:sor.fetchone()={ret}, {type(ret)}') + return ret f = awaitify(cur.fetchone) - return await f() + ret = await f() + debug(f'func:sor.fetchone()={ret}, {type(ret)}') + return ret async def execute(self, sql, value): sqltype = self.getSqlType(sql)