datatypes

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 8 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

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 (JSON) GormDataType

func (JSON) GormDataType() string

func (*JSON) Scan

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

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

func (JSON) Value

func (j JSON) 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 扫描至 Jsonb

func (JSONStr) Value

func (j JSONStr) 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