default_page <= max_page_size

This commit is contained in:
simon lehericey 2023-10-17 17:36:00 +02:00 committed by Paul Chavard
parent c5899f2c46
commit dbe67aaf18

View file

@ -64,7 +64,7 @@ module Connections
end
def compute_limit(first: nil, last: nil)
[first || last || default_page_size, max_page_size].min + 1
[first || last || default_page_size].min + 1
end
def timestamp_and_id_from_cursor(cursor)
@ -109,7 +109,7 @@ module Connections
first = [last, max_page_size].min
last = nil
else
last = [first || default_page_size, max_page_size].min
last = [first || default_page_size].min
first = nil
end
end