Documentation
¶
Index ¶
- type NullJSONMap
- func (NullJSONMap) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (m NullJSONMap) GormDataType() string
- func (jm NullJSONMap) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (m NullJSONMap) MarshalJSON() ([]byte, error)
- func (m *NullJSONMap) Scan(val interface{}) error
- func (m *NullJSONMap) UnmarshalJSON(b []byte) error
- func (m NullJSONMap) Value() (driver.Value, error)
- type NullJSONSlice
- func (NullJSONSlice[T]) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (NullJSONSlice[T]) GormDataType() string
- func (j NullJSONSlice[T]) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (j *NullJSONSlice[T]) Scan(value interface{}) error
- func (j NullJSONSlice[T]) Value() (driver.Value, error)
- type NullJSONType
- func (NullJSONType[T]) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (NullJSONType[T]) GormDataType() string
- func (js NullJSONType[T]) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (j NullJSONType[T]) IsZero() bool
- func (j NullJSONType[T]) MarshalJSON() ([]byte, error)
- func (j *NullJSONType[T]) Scan(value interface{}) error
- func (j *NullJSONType[T]) UnmarshalJSON(b []byte) error
- func (j NullJSONType[T]) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullJSONMap ¶
type NullJSONMap map[string]interface{}
NullJSONMap defined JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (NullJSONMap) GormDBDataType ¶
GormDBDataType gorm db data type
func (NullJSONMap) GormDataType ¶
func (m NullJSONMap) GormDataType() string
GormDataType gorm common data type
func (NullJSONMap) MarshalJSON ¶
func (m NullJSONMap) MarshalJSON() ([]byte, error)
MarshalJSON to output non base64 encoded []byte
func (*NullJSONMap) Scan ¶
func (m *NullJSONMap) Scan(val interface{}) error
Scan scan value into Jsonb, implements sql.Scanner interface
func (*NullJSONMap) UnmarshalJSON ¶
func (m *NullJSONMap) UnmarshalJSON(b []byte) error
UnmarshalJSON to deserialize []byte
type NullJSONSlice ¶
type NullJSONSlice[T any] []T
NullJSONSlice give a generic data type for json encoded slice data.
func NewJSONSlice ¶
func NewJSONSlice[T any](s []T) NullJSONSlice[T]
func (NullJSONSlice[T]) GormDBDataType ¶
GormDBDataType gorm db data type
func (NullJSONSlice[T]) GormDataType ¶
func (NullJSONSlice[T]) GormDataType() string
GormDataType gorm common data type
func (*NullJSONSlice[T]) Scan ¶
func (j *NullJSONSlice[T]) Scan(value interface{}) error
Scan scan value into NullJSONType[T], implements sql.Scanner interface
type NullJSONType ¶
type NullJSONType[T any] struct { Data T }
NullJSONType give a generic data type for json encoded data.
func NewJSONType ¶
func NewJSONType[T any](data T) NullJSONType[T]
func (NullJSONType[T]) GormDBDataType ¶
GormDBDataType gorm db data type
func (NullJSONType[T]) GormDataType ¶
func (NullJSONType[T]) GormDataType() string
GormDataType gorm common data type
func (NullJSONType[T]) IsZero ¶
func (j NullJSONType[T]) IsZero() bool
func (NullJSONType[T]) MarshalJSON ¶
func (j NullJSONType[T]) MarshalJSON() ([]byte, error)
MarshalJSON to output non base64 encoded []byte
func (*NullJSONType[T]) Scan ¶
func (j *NullJSONType[T]) Scan(value interface{}) error
Scan scan value into NullJSONType[T], implements sql.Scanner interface
func (*NullJSONType[T]) UnmarshalJSON ¶
func (j *NullJSONType[T]) UnmarshalJSON(b []byte) error
UnmarshalJSON to deserialize []byte