code: func (txn *Txn) getIndexValue(table, index string, args ...interface{}) (*IndexSchema, []byte, error) {
  	// Get the table schema
  	tableSchema, ok := txn.db.schema.Tables[table]
  	if !ok {
  		return nil, nil, fmt.Errorf("invalid table '%s'", table)
  	}
  
  	// Check for a prefix scan
  	prefixScan := false
  	if strings.HasSuffix(index, "_prefix") {
  		index = strings.TrimSuffix(index, "_prefix")
  		prefixScan = true
  	}
  
  	// Get the index schema
  	indexSchema, ok := tableSchema.Indexes[index]
  	if !ok {
  		return nil, nil, fmt.Errorf("invalid index '%s'", index)
  	}
  
  	// Hot-path for when there are no arguments
  	if len(args) == 0 {
  		return indexSchema, nil, nil
  	}
  
  	// Special case the prefix scanning
  	if prefixScan {
  		prefixIndexer, ok := indexSchema.Indexer.(PrefixIndexer)
  		if !ok {
  			return indexSchema, nil,
  				fmt.Errorf("index '%s' does not support prefix scanning", index)
  		}
  
  		val, err := prefixIndexer.PrefixFromArgs(args...)
  		if err != nil {
  			return indexSchema, nil, fmt.Errorf("index error: %v", err)
  		}
  		return indexSchema, val, err
  	}
  
  	// Get the exact match index
  	val, err := indexSchema.Indexer.FromArgs(args...)
  	if err != nil {
  		return indexSchema, nil, fmt.Errorf("index error: %v", err)
  	}
  	return indexSchema, val, err
  }
docs: // getIndexValue is used to get the IndexSchema and the value
  // used to scan the index given the parameters. This handles prefix based
  // scans when the index has the "_prefix" suffix. The index must support
  // prefix iteration.