code: func (txn *Txn) DeleteAll(table, index string, args ...interface{}) (int, error) {
  	if !txn.write {
  		return 0, fmt.Errorf("cannot delete in read-only transaction")
  	}
  
  	// Get all the objects
  	iter, err := txn.Get(table, index, args...)
  	if err != nil {
  		return 0, err
  	}
  
  	// Put them into a slice so there are no safety concerns while actually
  	// performing the deletes
  	var objs []interface{}
  	for {
  		obj := iter.Next()
  		if obj == nil {
  			break
  		}
  
  		objs = append(objs, obj)
  	}
  
  	// Do the deletes
  	num := 0
  	for _, obj := range objs {
  		if err := txn.Delete(table, obj); err != nil {
  			return num, err
  		}
  		num++
  	}
  	return num, nil
  }
docs: // DeleteAll is used to delete all the objects in a given table
  // matching the constraints on the index