Skip to content

Commit

Permalink
assert pagination.max_page_size
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Nov 25, 2024
1 parent 0213627 commit fd4abef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kong/db/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ function DB.new(kong_config, strategy)

local connector, strategies, err = Strategies.new(kong_config, strategy,
schemas, errors)
-- check pagination.max_page_size
assert(connector.defaults.pagination.max_page_size ==
strategy == "off" and 2048 or 50000)

if err then
return nil, err
end
Expand All @@ -114,6 +118,10 @@ function DB.new(kong_config, strategy)
return nil, fmt("no strategy found for schema '%s'", schema.name)
end
daos[schema.name] = DAO.new(self, schema, strategy, errors)

-- check pagination.max_page_size
assert(daos[schema.name].pagination.max_page_size ==
strategy == "off" and 2048 or 50000)
end
end

Expand Down

0 comments on commit fd4abef

Please sign in to comment.