orm

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericJsonArray

type GenericJsonArray[T any] []T

func (*GenericJsonArray[T]) Scan

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

Scan 实现 sql.Scanner 接口

func (GenericJsonArray[T]) Value

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

Value 实现 driver.Valuer 接口

type JsonObject

type JsonObject []map[string]any

JsonObject 是一个表示 JSON 对象数组的类型

func (*JsonObject) Scan

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

Scan 实现 sql.Scanner 接口,用于从数据库读取 JSON 数据到结构体

func (JsonObject) Value

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

Value 实现 driver.Valuer 接口,用于将结构体数据保存为 JSON 到数据库

Jump to

Keyboard shortcuts

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