bricks/examples/list_tables.dspy
2023-09-14 10:28:07 +08:00

16 lines
239 B
Plaintext

db = DBPools();
if params_kw.get('page', '1') != '1':
print(params_kw)
return {
"total":"0",
"rows":[]
}
async with db.sqlorContext('kboss') as sor:
d = await sor.tables();
print(len(d))
return {
"total":len(d),
"rows":d
}