JVM - collection.query.limit()
Limit the number of results returned by a query.
import io.nitric.Nitric;import io.nitric.resources.CollectionPermission;class User {String name;int age;public User(String name, int age) {this.name = name;this.age = age;}}public class Application {public static void main(String[] args) {var profiles = Nitric.INSTANCE.collection("profiles", User.class).with(CollectionPermission.Read);var profilesQuery = profiles.query().limit(10);Nitric.INSTANCE.run();}}
Parameters
- Name
limit
- Required
- Required
- Type
- Int
- Description
The limit to apply to the query. Must be a postive integer.
See also
Last updated on Dec 19, 2024