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