cockroach: github.com/cockroachdb/cockroach/pkg/util/keysutil Index | Files

package keysutil

import "github.com/cockroachdb/cockroach/pkg/util/keysutil"

Index

Package Files

keys.go

type PrettyScanner Uses

type PrettyScanner struct {
    // contains filtered or unexported fields
}

PrettyScanner implements a partial right inverse to keys.PrettyPrint(): it takes a key formatted for human consumption and attempts to translate it into a roachpb.Key. Not all key types are supported, but a function for decoding the SQL table space can be provided (to replace the weak default one).

No optimization has been performed. This is intended for use in debugging and tests only.

func MakePrettyScanner Uses

func MakePrettyScanner(tableParser keys.KeyParserFunc) PrettyScanner

MakePrettyScanner creates a PrettyScanner.

If tableParser is not nil, it will replace the default function for scanning pretty-printed keys from the table part of the keys space (i.e. inputs starting with "/Table"). The supplied function needs to parse the part that comes after "/Table".

func (PrettyScanner) Scan Uses

func (s PrettyScanner) Scan(input string) (_ roachpb.Key, rErr error)

Scan is a partial right inverse to PrettyPrint: it takes a key formatted for human consumption and attempts to translate it into a roachpb.Key. Not all key types are supported and no optimization has been performed. This is intended for use in debugging and tests only.

Package keysutil imports 5 packages (graph) and is imported by 6 packages. Updated 2019-09-02. Refresh now. Tools for package owners.