strictify

package
v0.0.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StrictifyRangeError error = xerrors.NewSentinel("value is outside of the allowed range for the strict type")

Functions

func Strictify

func Strictify(c *changeitem.ChangeItem, tableSchema changeitem.FastTableSchema) error

Strictify converts Values inside an item to their strict representations in-place. To determine the type to which to convert the value of each column, the given set of column schemas is used.

The method returns different classes of errors, some of which can be handled. See implementation for details. If an error returned is not `nil`, all values remain unchanged.

Types

type StrictifyError

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

StrictifyError is a general strictification error. It contains the column name and the target type name.

func NewStrictifyError

func NewStrictifyError(sch *changeitem.ColSchema, strictType schema.Type, err error) *StrictifyError

func (StrictifyError) Error

func (e StrictifyError) Error() string

func (StrictifyError) Is

func (e StrictifyError) Is(err error) bool

func (StrictifyError) Unwrap

func (e StrictifyError) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL