This commit is contained in:
yumoqing 2025-08-29 23:36:30 +08:00
parent d8b7e1806e
commit e7816256e8

View File

@ -32,6 +32,7 @@ try:
import ujson as json import ujson as json
except: except:
import json import json
from appPublic.log import debug
class DBFilter(object): class DBFilter(object):
operators = [ operators = [
@ -150,7 +151,7 @@ def default_filterjson(fields: list, ns: dict):
'op':'=', 'op':'=',
'var':k 'var':k
} for k in ns.keys() if k in fields ] } for k in ns.keys() if k in fields ]
print(f'default_filterjson():{c=}') debug(f'default_filterjson():{c=}')
if len(c) < 1: if len(c) < 1:
return None return None
if len(c) < 2: if len(c) < 2:
@ -175,6 +176,6 @@ if __name__ == '__main__':
} }
dbf = DBFilter(fj) dbf = DBFilter(fj)
print(fj) debug(fj)
print(dbf.gen({'name':'joe'})) debug(dbf.gen({'name':'joe'}))
print(f'{dbf.consts=}') debug(f'{dbf.consts=}')