comparison roundup/backends/back_sqlite.py @ 5869:16e1255b16cf

Implement limit and offset for filter These map to the corresponding SQL parameters for the SQL backends.
author Ralf Schlatterbeck <rsc@runtux.com>
date Mon, 26 Aug 2019 20:23:53 +0200
parents ee2e8f8d6648
children 19a58adf5d1f
comparison
equal deleted inserted replaced
5868:d2fac1069028 5869:16e1255b16cf
452 classname, cols, nodeid) 452 classname, cols, nodeid)
453 cols = range(5) 453 cols = range(5)
454 return [[row[col] for col in cols] for row in l] 454 return [[row[col] for col in cols] for row in l]
455 455
456 class sqliteClass: 456 class sqliteClass:
457 def filter(self, search_matches, filterspec, sort=(None,None), 457 def filter(self, *args, **kw):
458 group=(None,None), retired=False, exact_match_spec={}):
459 """ If there's NO matches to a fetch, sqlite returns NULL 458 """ If there's NO matches to a fetch, sqlite returns NULL
460 instead of nothing 459 instead of nothing
461 """ 460 """
462 return [f for f in rdbms_common.Class.filter(self, search_matches, 461 return [f for f in rdbms_common.Class.filter(self, *args, **kw) if f]
463 filterspec, sort=sort, group=group, retired=retired,
464 exact_match_spec=exact_match_spec) if f]
465 462
466 class Class(sqliteClass, rdbms_common.Class): 463 class Class(sqliteClass, rdbms_common.Class):
467 pass 464 pass
468 465
469 class IssueClass(sqliteClass, rdbms_common.IssueClass): 466 class IssueClass(sqliteClass, rdbms_common.IssueClass):

Roundup Issue Tracker: http://roundup-tracker.org/