Documentation ¶
Index ¶
- 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 interface{}) (err error)
- func (date *Date) UnmarshalJSON(b []byte) error
- func (date Date) Value() (driver.Value, error)
- type IPPrefix
- func (r IPPrefix) Contains(ip netip.Addr) bool
- func (IPPrefix) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (IPPrefix) GormDataType() string
- func (m IPPrefix) MarshalJSON() ([]byte, error)
- func (m *IPPrefix) Scan(val interface{}) error
- func (m *IPPrefix) UnmarshalJSON(b []byte) error
- func (m IPPrefix) Value() (driver.Value, error)
- type Int64
- func (r *Int64) Add(n int64) int64
- func (r *Int64) CAS(old, new int64) bool
- func (r *Int64) Dec() int64
- func (Int64) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Int64) GormDataType() string
- func (r *Int64) Inc() int64
- func (r *Int64) Load() int64
- func (r *Int64) Scan(val interface{}) error
- func (r *Int64) Store(n int64)
- func (r *Int64) Sub(n int64) int64
- func (r *Int64) Swap(n int64) int64
- func (r *Int64) Value() (driver.Value, error)
- type JSON
- func (JSON) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (JSON) GormDataType() string
- func (js JSON) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (j JSON) MarshalJSON() ([]byte, error)
- func (j *JSON) Scan(value interface{}) error
- func (j JSON) String() string
- func (j *JSON) UnmarshalJSON(b []byte) error
- func (j JSON) Value() (driver.Value, error)
- type JSONMap
- func (JSONMap) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (m JSONMap) GormDataType() string
- func (jm JSONMap) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (m JSONMap) MarshalJSON() ([]byte, error)
- func (m *JSONMap) Scan(val interface{}) error
- func (m *JSONMap) UnmarshalJSON(b []byte) error
- func (m JSONMap) Value() (driver.Value, error)
- type JSONQueryExpression
- type Time
- func (Time) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Time) GormDataType() string
- func (t Time) MarshalJSON() ([]byte, error)
- func (t *Time) Scan(src interface{}) error
- func (t Time) String() string
- func (t *Time) UnmarshalJSON(data []byte) error
- func (t Time) Value() (driver.Value, error)
- type URL
- func (URL) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (URL) GormDataType() string
- func (u URL) MarshalJSON() ([]byte, error)
- func (u *URL) Scan(value interface{}) 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 ¶
This section is empty.
Types ¶
type Date ¶
func (Date) GormDataType ¶
GormDataType gorm common data type
func (Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type IPPrefix ¶
func (IPPrefix) GormDBDataType ¶
func (IPPrefix) GormDataType ¶
func (IPPrefix) MarshalJSON ¶
func (*IPPrefix) UnmarshalJSON ¶
type Int64 ¶
type Int64 int64
Int64 is an atomic wrapper around an int64.
func (Int64) GormDataType ¶
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 ¶
type JSONMap map[string]interface{}
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 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 interface{}, keys ...string) *JSONQueryExpression
Keys returns clause.Expression
func (*JSONQueryExpression) HasKey ¶
func (jsonQuery *JSONQueryExpression) HasKey(keys ...string) *JSONQueryExpression
HasKey returns clause.Expression
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.