Go is in development for v1. Interested in contributing or chatting with us?Get in touch!
Go - Collection.Query()
Begins a new query on a Collection.
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()
if err := nitric.Run(); err != nil {
fmt.Println(err)
}
}
See also
- Adding filters: Query().Where()
- Limiting the results: Query().Limit()
- Streaming results: Query().Stream()
- Fetching results: Query().Fetch()
- Using paging tokens: Query().FromPagingToken()