diff --git a/docs/content/en/docs/Getting started/writing_queries.md b/docs/content/en/docs/Getting started/writing_queries.md index f0ed3201..aa9a1cdc 100644 --- a/docs/content/en/docs/Getting started/writing_queries.md +++ b/docs/content/en/docs/Getting started/writing_queries.md @@ -47,6 +47,12 @@ details on expressions, see [this guide]({{< relref "expressions.md" >}}). ### Limit You can limit the amount of results returned by calling `limit` on queries. The method accepts the amount of rows to return and an optional offset. +```dart +Future> limitTodos(int limit, {int offset}) { + return (select(todos)..limit(limit, offset: offset)).get(); +} +``` + ### Ordering You can use the `orderBy` method on the select statement. It expects a list of functions that extract the individual ordering terms from the table.