cockroach: github.com/cockroachdb/cockroach/pkg/sql/scrub Index | Files

package scrub

import "github.com/cockroachdb/cockroach/pkg/sql/scrub"

Index

Package Files

errors.go

Constants

const (
    // MissingIndexEntryError occurs when a primary k/v is missing a
    // corresponding secondary index k/v.
    MissingIndexEntryError = "missing_index_entry"
    // DanglingIndexReferenceError occurs when a secondary index k/v
    // points to a non-existing primary k/v.
    DanglingIndexReferenceError = "dangling_index_reference"
    // PhysicalError is a generic error when there is an error in the
    // SQL physical data.
    PhysicalError = "physical_error"
    // IndexKeyDecodingError occurs while decoding the an index key.
    IndexKeyDecodingError = "index_key_decoding_error"
    // IndexValueDecodingError occurs while decoding the an index value.
    IndexValueDecodingError = "index_value_decoding_error"
    // SecondaryIndexKeyExtraValueDecodingError occurs when the extra
    // columns stored in a key fail to decode.
    SecondaryIndexKeyExtraValueDecodingError = "secondary_index_key_extra_value_decoding_error"
    // UnexpectedNullValueError occurs when a null value is encountered where the
    // value is expected to be non-nullable.
    UnexpectedNullValueError = "null_value_error"
    // CheckConstraintViolation occurs when a row in a table is
    // violating a check constraint.
    CheckConstraintViolation = "check_constraint_violation"
    // ForeignKeyConstraintViolation occurs when a row in a
    // table is violating a foreign key constraint.
    ForeignKeyConstraintViolation = "foreign_key_violation"
)

func IsScrubError Uses

func IsScrubError(err error) bool

IsScrubError checks if an error is a Error.

func UnwrapScrubError Uses

func UnwrapScrubError(err error) error

UnwrapScrubError gets the underlying error if err is a scrub.Error. If err is not a scrub.Error nil is returned.

type Error Uses

type Error struct {
    Code string
    // contains filtered or unexported fields
}

Error contains the details on the scrub error that was caught.

func WrapError Uses

func WrapError(code string, err error) *Error

WrapError wraps an error with a Error.

func (*Error) Cause Uses

func (s *Error) Cause() error

Cause unwraps the error.

func (*Error) Error Uses

func (s *Error) Error() string

func (*Error) Format Uses

func (s *Error) Format(st fmt.State, verb rune)

Format implements fmt.Formatter.

Package scrub imports 2 packages (graph) and is imported by 6 packages. Updated 2019-07-20. Refresh now. Tools for package owners.