code: func (s *Store) preparedQueryDeleteTxn(tx *memdb.Txn, idx uint64, queryID string) error {
  	// Pull the query.
  	wrapped, err := tx.First("prepared-queries", "id", queryID)
  	if err != nil {
  		return fmt.Errorf("failed prepared query lookup: %s", err)
  	}
  	if wrapped == nil {
  		return nil
  	}
  
  	// Delete the query and update the index.
  	if err := tx.Delete("prepared-queries", wrapped); err != nil {
  		return fmt.Errorf("failed prepared query delete: %s", err)
  	}
  	if err := tx.Insert("index", &IndexEntry{"prepared-queries", idx}); err != nil {
  		return fmt.Errorf("failed updating index: %s", err)
  	}
  
  	return nil
  }
docs: // preparedQueryDeleteTxn is the inner method used to delete a prepared query
  // with the proper indexes into the state store.