gormdatatypes

package
v1.22.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONMap

type JSONMap map[string]string

func (JSONMap) GormDBDataType

func (JSONMap) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (JSONMap) GormDataType

func (m JSONMap) GormDataType() string

GormDataType gorm common data type

func (JSONMap) MarshalJSON

func (m JSONMap) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*JSONMap) Scan

func (m *JSONMap) Scan(val interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (*JSONMap) UnmarshalJSON

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

UnmarshalJSON to deserialize []byte

func (JSONMap) Value

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

Value return json value, implement driver.Valuer interface

type JSONSlice

type JSONSlice []string

func (JSONSlice) GormDBDataType

func (JSONSlice) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (JSONSlice) GormDataType

func (m JSONSlice) GormDataType() string

GormDataType gorm common data type

func (JSONSlice) MarshalJSON

func (m JSONSlice) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*JSONSlice) Scan

func (m *JSONSlice) Scan(val interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (*JSONSlice) UnmarshalJSON

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

UnmarshalJSON to deserialize []byte

func (JSONSlice) Value

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

Value return json value, implement driver.Valuer interface

Jump to

Keyboard shortcuts

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