sqlutils

package
v0.4.26 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map map[string]interface{}

Map type is an alias for map[string]interface{}

It implements native SQL driver interfaces and hence can be used for SQL json or jsonb types as a drop in replacement of golang native maps

func (Map) Interface

func (m Map) Interface() interface{}

Interface implements the nulls.nullable interface.

func (*Map) Scan

func (m *Map) Scan(src interface{}) error

Scan implements the sql.Scanner interface. It allows to read the map from the database value.

func (*Map) UnmarshalJSON

func (m *Map) UnmarshalJSON(b []byte) error

UnmarshalJSON will unmarshall JSON value into the map representation of this value.

func (Map) UnmarshalText

func (m Map) UnmarshalText(text []byte) error

UnmarshalText will unmarshall text value into the map representation of this value.

func (Map) Value

func (m Map) Value() (driver.Value, error)

Value implements the driver.Valuer interface. It allows to convert the map to a driver.value.

type XormMap

type XormMap map[string]interface{}

func (*XormMap) FromDB

func (m *XormMap) FromDB(data []byte) error

func (*XormMap) String

func (m *XormMap) String() string

func (*XormMap) ToDB

func (m *XormMap) ToDB() ([]byte, error)

Jump to

Keyboard shortcuts

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