code: func (e *EntityDefinition) UniqueKey(oldKey *PrimaryKey) *PrimaryKey {
  	indexHas := oldKey.PrimaryKeySet()
  	result := *oldKey
  
  	// look for missing primary keys
  	for _, key := range e.Key.PartitionKeys {
  		if _, ok := indexHas[key]; !ok {
  			result.ClusteringKeys = append(result.ClusteringKeys, &ClusteringKey{
  				Name: key})
  		}
  	}
  
  	// look for missing clustering keys
  	for _, key := range e.Key.ClusteringKeys {
  		if _, ok := indexHas[key.Name]; !ok {
  			result.ClusteringKeys = append(result.ClusteringKeys, &ClusteringKey{
  				Name: key.Name})
  		}
  	}
  
  	return &result
  }
docs: // UniqueKey adds any missing keys from the entity's primary key to the keys
  // specified in the index, to guarantee that the returned key is unique
  // This method is used to create materialized views