code: func UniqueConstraint(t *testing.T, repo grimoire.Repo) {
  	extra1 := Extra{}
  	extra2 := Extra{}
  	repo.From(extras).Set("slug", "slug1").MustInsert(&extra1)
  	repo.From(extras).Set("slug", "slug2").MustInsert(&extra2)
  
  	t.Run("UniqueConstraint", func(t *testing.T) {
  		// inserting
  		err := repo.From(extras).Set("slug", extra1.Slug).Insert(nil)
  		assertConstraint(t, err, errors.UniqueConstraint, "slug")
  
  		// updating
  		err = repo.From(extras).Find(extra2.ID).Set("slug", extra1.Slug).Update(nil)
  		assertConstraint(t, err, errors.UniqueConstraint, "slug")
  	})
  }
docs: // UniqueConstraint tests unique constraint specifications.