Documentation ¶
Index ¶
- func Column(col string) columnExpression
- type Date
- func (date *Date) GobDecode(b []byte) error
- func (date *Date) GobEncode() ([]byte, error)
- func (date *Date) GormDataType() string
- func (date *Date) MarshalJSON() ([]byte, error)
- func (date *Date) Scan(value any) (err error)
- func (date *Date) UnmarshalJSON(b []byte) error
- func (date *Date) Value() (driver.Value, error)
- type JSONOverlapsExpression
- type JSONQueryExpression
- func (jsonQuery *JSONQueryExpression) Build(builder clause.Builder)
- func (jsonQuery *JSONQueryExpression) Equals(value any, keys ...string) *JSONQueryExpression
- func (jsonQuery *JSONQueryExpression) Extract(path string) *JSONQueryExpression
- func (jsonQuery *JSONQueryExpression) HasKey(keys ...string) *JSONQueryExpression
- type Json
- func (j *Json) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (j *Json) GormDataType() string
- func (j *Json) GormValue(_ context.Context, db *gorm.DB) clause.Expr
- func (j *Json) MarshalJSON() ([]byte, error)
- func (j *Json) Scan(value any) error
- func (j *Json) String() string
- func (j *Json) UnmarshalJSON(b []byte) error
- func (j *Json) Value() (driver.Value, error)
- type JsonMap
- func (m *JsonMap) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (m *JsonMap) GormDataType() string
- func (m *JsonMap) GormValue(_ context.Context, db *gorm.DB) clause.Expr
- func (m *JsonMap) MarshalJSON() ([]byte, error)
- func (m *JsonMap) Scan(val any) error
- func (m *JsonMap) UnmarshalJSON(b []byte) error
- func (m *JsonMap) Value() (driver.Value, error)
- type Slice
- func (s *Slice[T]) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (s *Slice[T]) GormDataType() string
- func (s *Slice[T]) MarshalJSON() ([]byte, error)
- func (s *Slice[T]) Scan(value any) (err error)
- func (s *Slice[T]) UnmarshalJSON(b []byte) error
- func (s *Slice[T]) Value() (driver.Value, error)
- type Time
- func (t *Time) GormDBDataType(db *gorm.DB, _ *schema.Field) string
- func (t *Time) GormDataType() string
- func (t *Time) MarshalJSON() ([]byte, error)
- func (t *Time) Scan(src any) error
- func (t *Time) String() string
- func (t *Time) UnmarshalJSON(data []byte) error
- func (t *Time) Value() (driver.Value, error)
- type URL
- func (u *URL) GormDBDataType(_ *gorm.DB, _ *schema.Field) string
- func (u *URL) GormDataType() string
- func (u *URL) MarshalJSON() ([]byte, error)
- func (u *URL) Scan(value any) error
- func (u *URL) String() string
- func (u *URL) UnmarshalJSON(data []byte) error
- func (u *URL) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Date ¶
func (*Date) GormDataType ¶
GormDataType gorm common data type
func (*Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type JSONOverlapsExpression ¶
type JSONOverlapsExpression struct {
// contains filtered or unexported fields
}
JSONOverlapsExpression JSON_OVERLAPS expression, implements clause.Expression interface to use as querier
func JSONOverlaps ¶
func JSONOverlaps(column clause.Expression, value string) *JSONOverlapsExpression
JSONOverlaps query column as json
func (*JSONOverlapsExpression) Build ¶
func (json *JSONOverlapsExpression) Build(builder clause.Builder)
Build implements clause.Expression only mysql support JSON_OVERLAPS
type JSONQueryExpression ¶
type JSONQueryExpression struct {
// contains filtered or unexported fields
}
JSONQueryExpression json query expression, implements clause.Expression interface to use as querier
func (*JSONQueryExpression) Build ¶
func (jsonQuery *JSONQueryExpression) Build(builder clause.Builder)
Build implements clause.Expression
func (*JSONQueryExpression) Equals ¶
func (jsonQuery *JSONQueryExpression) Equals(value any, keys ...string) *JSONQueryExpression
Equals Keys returns clause.Expression
func (*JSONQueryExpression) Extract ¶
func (jsonQuery *JSONQueryExpression) Extract(path string) *JSONQueryExpression
Extract extract json with path
func (*JSONQueryExpression) HasKey ¶
func (jsonQuery *JSONQueryExpression) HasKey(keys ...string) *JSONQueryExpression
HasKey returns clause.Expression
type Json ¶
type Json json.RawMessage
Json defined Json data type, need to implements driver.Valuer, sql.Scanner interface
func (*Json) GormDBDataType ¶
GormDBDataType gorm db data type
func (*Json) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*Json) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type JsonMap ¶
JsonMap defined Json data type, need to implements driver.Valuer, sql.Scanner interface
func (*JsonMap) GormDBDataType ¶
GormDBDataType gorm db data type
func (*JsonMap) GormDataType ¶
GormDataType gorm common data type
func (*JsonMap) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*JsonMap) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type Slice ¶
type Slice[T any] []T
func (*Slice[T]) GormDBDataType ¶
GormDBDataType gorm db data type
func (*Slice[T]) GormDataType ¶
func (*Slice[T]) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*Slice[T]) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type Time ¶
Time is time data type.
func (*Time) GormDBDataType ¶
GormDBDataType returns gorm DB data type based on the current using database.
func (*Time) GormDataType ¶
GormDataType returns gorm common data type. This type is used for the field's column type.
func (*Time) MarshalJSON ¶
MarshalJSON implements json.Marshaler to convert Time to json serialization.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler to deserialize json data.