code: func (s *Restore) PreparedQuery(query *structs.PreparedQuery) error {
  	// If this is a template, compile it, otherwise leave the compiled
  	// template field nil.
  	var ct *prepared_query.CompiledTemplate
  	if prepared_query.IsTemplate(query) {
  		var err error
  		ct, err = prepared_query.Compile(query)
  		if err != nil {
  			return fmt.Errorf("failed compiling template: %s", err)
  		}
  	}
  
  	// Insert the wrapped query.
  	if err := s.tx.Insert("prepared-queries", &queryWrapper{query, ct}); err != nil {
  		return fmt.Errorf("failed restoring prepared query: %s", err)
  	}
  	if err := indexUpdateMaxTxn(s.tx, query.ModifyIndex, "prepared-queries"); err != nil {
  		return fmt.Errorf("failed updating index: %s", err)
  	}
  
  	return nil
  }
docs: // PreparedQuery is used when restoring from a snapshot. For general inserts,
  // use PreparedQuerySet.