clamp_limit

Function clamp_limit 

Source
fn clamp_limit(provided: Option<i64>, default: i64, max: i64) -> i64
Expand description

Clamps a caller-provided row limit to the configured maximum.

None, zero, or negative values return the default. Values above the maximum are clamped down so the database is never forced to materialise an unbounded result set.