code: func (s *Store) PreparedQueryList(ws memdb.WatchSet) (uint64, structs.PreparedQueries, error) {
  	tx := s.db.Txn(false)
  	defer tx.Abort()
  
  	// Get the table index.
  	idx := maxIndexTxn(tx, "prepared-queries")
  
  	// Query all of the prepared queries in the state store.
  	queries, err := tx.Get("prepared-queries", "id")
  	if err != nil {
  		return 0, nil, fmt.Errorf("failed prepared query lookup: %s", err)
  	}
  	ws.Add(queries.WatchCh())
  
  	// Go over all of the queries and build the response.
  	var result structs.PreparedQueries
  	for wrapped := queries.Next(); wrapped != nil; wrapped = queries.Next() {
  		result = append(result, toPreparedQuery(wrapped))
  	}
  	return idx, result, nil
  }
docs: // PreparedQueryList returns all the prepared queries.