datatypes

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array[T any] []T

func (*Array[T]) Scan added in v1.2.8

func (d *Array[T]) Scan(value interface{}) error

func (Array[T]) Value added in v1.2.8

func (d Array[T]) Value() (driver.Value, error)

type FloatArray

type FloatArray[T constraints.Float] []T

func (*FloatArray[T]) Scan

func (d *FloatArray[T]) Scan(value interface{}) error

func (FloatArray[T]) Value

func (d FloatArray[T]) Value() (driver.Value, error)

type IntArray

type IntArray[T constraints.Integer] []T

adpter postgres

func (*IntArray[T]) Scan

func (d *IntArray[T]) Scan(value interface{}) error

func (IntArray[T]) Value

func (d IntArray[T]) Value() (driver.Value, error)

type JSON

type JSON map[string]any

func (JSONB) ConvertValue(v any) (driver.Value, error) {

}

func (JSON) GormDataType

func (JSON) GormDataType() string

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 Json

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type JSONArray added in v1.2.8

type JSONArray []map[string]any

func (*JSONArray) GormDataType added in v1.2.8

func (*JSONArray) GormDataType() string

func (*JSONArray) Scan added in v1.2.8

func (j *JSONArray) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 Json

func (JSONArray) Value added in v1.2.8

func (j JSONArray) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type JSONArrayT added in v1.2.8

type JSONArrayT[T any] []T

func (*JSONArrayT[T]) GormDataType added in v1.2.8

func (*JSONArrayT[T]) GormDataType() string

func (*JSONArrayT[T]) Scan added in v1.2.8

func (j *JSONArrayT[T]) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 Json

func (JSONArrayT[T]) Value added in v1.2.8

func (j JSONArrayT[T]) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type JSONB

type JSONB json.RawMessage

func (*JSONB) GormDataType

func (*JSONB) GormDataType() string

func (*JSONB) Scan

func (j *JSONB) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 Jsonb

func (JSONB) Value

func (j JSONB) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type JSONStr

type JSONStr string

func (*JSONStr) GormDataType

func (*JSONStr) GormDataType() string

func (*JSONStr) Scan

func (j *JSONStr) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 JsonStr

func (JSONStr) Value

func (j JSONStr) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type JSONT added in v1.2.8

type JSONT[T any] struct {
	JSON *T
}

func (*JSONT[T]) GormDataType added in v1.2.8

func (*JSONT[T]) GormDataType() string

func (*JSONT[T]) Scan added in v1.2.8

func (j *JSONT[T]) Scan(value interface{}) error

实现 sql.Scanner 接口,Scan 将 value 扫描至 Json

func (JSONT[T]) Value added in v1.2.8

func (j JSONT[T]) Value() (driver.Value, error)

实现 driver.Valuer 接口,Value 返回 json value

type StringArray

type StringArray []string

func (*StringArray) Scan

func (d *StringArray) Scan(value interface{}) error

func (StringArray) Value

func (d StringArray) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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