Documentation ¶
Index ¶
- type Slice
- func (Slice[T]) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (m Slice[T]) GormDataType() string
- func (m Slice[T]) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (m Slice[T]) MarshalJSON() ([]byte, error)
- func (m *Slice[T]) Scan(val interface{}) error
- func (m *Slice[T]) UnmarshalJSON(b []byte) error
- func (m Slice[T]) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Slice ¶ added in v0.2.0
type Slice[T any] []T
Slice defined JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (Slice[T]) GormDBDataType ¶ added in v0.2.0
GormDBDataType gorm db data type
func (Slice[T]) GormDataType ¶ added in v0.2.0
GormDataType gorm common data type
func (Slice[T]) MarshalJSON ¶ added in v0.2.0
MarshalJSON to output non base64 encoded []byte
func (*Slice[T]) Scan ¶ added in v0.2.0
Scan scan value into Jsonb, implements sql.Scanner interface
func (*Slice[T]) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON to deserialize []byte
Click to show internal directories.
Click to hide internal directories.