type
CollectionIndex
type CollectionIndex struct {
Fields []string
Unique bool
}One ordered compound database index.
Fields[]string- Dot-separated authored paths in index order; paths may traverse non-repeated groups.
Uniquebool- Enforces tuple uniqueness while still allowing multiple rows containing null.
Example
CollectionIndex{Fields: []string{"tenant", "slug"}, Unique: true}