Certificate Requests#
QueryReq.doSearch(count, direction, top, bottom):
if direction == 'previous':
doSearch(-count, top)
elif direction == 'next':
doSearch(count, bottom + 1)
elif direction == 'begin':
doSearch(count, 0)
elif direction == 'first':
doSearch(count, bottom)
else: # direction == 'end':
doSearch(-count, -1)
QueryReq.doSearch(count, marker):
jumptoend = false
if marker == -1:
marker = 0
jumptoend = true
list = getPagedRequestsByFilter(marker, jumptoend, count < 0 ? count -1 : count + 1)
maxCount = 0
if count < 0 && jumptoend:
maxCount = -count
elif count < 0:
maxCount = -count + 1
else:
maxCount = count
totalCount = jumptoend ? maxCount : list.getSize() - list.getCurrentIndex()
v = fetchRecords(list, maxCount)
v = normalizeOrder(v)
trim(v, marker)
Scenario 1: Searching the last request ID#
In this example there are 7 entries in the database.
First page#
QueryReq.doSearch(20, ‘first’, 0, 7)
marker: 7
list: [7]
entry #7 was removed => bug