Skip to main content

limit

Function limit 

Source
pub fn limit<Q: HasLimit>(count: impl IntoExpr) -> impl Mod<Q>
Expand description

LIMIT count.

SQLite takes a whole expression here, not just a literal or a parameter, so a sub-select works. A plain number is a literal — limit(20) gives LIMIT 20 — because IntoExpr makes it one; limit(arg(20)) binds it instead.

There is no LIMIT ALL: that is PostgreSQL’s spelling for “no limit”, and SQLite’s is a negative count.