code: func (*PreparedQueryIndex) FromObject(obj interface{}) (bool, []byte, error) {
  	wrapped, ok := obj.(*queryWrapper)
  	if !ok {
  		return false, nil, fmt.Errorf("invalid object given to index as prepared query")
  	}
  
  	query := toPreparedQuery(wrapped)
  	if !prepared_query.IsTemplate(query) {
  		return false, nil, nil
  	}
  
  	// Always prepend a null so that we can represent even an empty name.
  	out := "\x00" + strings.ToLower(query.Name)
  	return true, []byte(out), nil
  }
docs: // FromObject is used to compute the index key when inserting or updating an
  // object.