Go - Collection.Query.Limit()
Limit the number of results returned by a query.
import ("fmt""github.com/nitrictech/go-sdk/nitric")func main() {profiles, err := nitric.NewCollection("profiles").With(nitric.CollectionReading, nitric.CollectionWriting, nitric.CollectionDeleting)if err != nil {return}profilesQuery := profiles.Query().Limit(10)nitric.Run()}
Parameters
- Name
limit
- Required
- Required
- Type
- int
- Description
The limit to apply to the query.
See also
Last updated on Dec 30, 2024