kboss/b/src/id2file.py
2025-07-16 14:27:17 +08:00

13 lines
262 B
Python

from sqlor.dbpools import runSQL
async def getFilenameFromId(idstr:str) -> str:
sql = "select * from kvobjects where id='%s'" % idstr
recs = await runSQL('homedata',sql)
if recs is None:
return None
if len(recs) == 0:
return None
return recs[0].name