json

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONNull = "null"
)

Variables

View Source
var ErrUnexpectedJSONTypeIn = errors.New("unexpected type during JSON marshalling")
View Source
var ErrUnexpectedJSONTypeOut = errors.New("unexpected type during JSON unmarshalling")

Functions

func MustTypesJSON

func MustTypesJSON(str string) types.JSON

Types

type NomsJSON

type NomsJSON types.JSON

NomsJSON is a type alias for types.JSON. The alias allows MySQL-specific logic to be kept separate from the storage-layer code in pkg types.

func MustNomsJSON

func MustNomsJSON(str string) NomsJSON

func MustNomsJSONWithVRW

func MustNomsJSONWithVRW(vrw types.ValueReadWriter, str string) NomsJSON

func NomsJSONFromJSONValue

func NomsJSONFromJSONValue(ctx context.Context, vrw types.ValueReadWriter, val sql.JSONValue) (NomsJSON, error)

NomsJSONFromJSONValue converts a sql.JSONValue to a NomsJSON value.

func (NomsJSON) Compare

func (v NomsJSON) Compare(ctx *sql.Context, other sql.JSONValue) (cmp int, err error)

Compare implements the sql.JSONValue interface.

func (NomsJSON) ToString

func (v NomsJSON) ToString(ctx *sql.Context) (string, error)

ToString implements the sql.JSONValue interface.

func (NomsJSON) Unmarshall

func (v NomsJSON) Unmarshall(ctx *sql.Context) (doc sql.JSONDocument, err error)

Unmarshall implements the sql.JSONValue interface.

Jump to

Keyboard shortcuts

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