Documentation
¶
Overview ¶
Package eav EAV 模式的数据库操作
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Simple ¶
type Simple[T any] struct { // contains filtered or unexported fields }
Simple 简单的 EAV 操作接口
以 JSON 或是类似的编码保存数据,不适合查询类操作。
func NewSimple ¶
func NewSimple[T any](tableName string, db *orm.DB, marshal serializer.MarshalFunc, unmarshal serializer.UnmarshalFunc) *Simple[T]
NewSimple 加载简要的 EAV 操作接口
tableName 为表名; marshal 和 unmarshal 表示将对象保存至表的编解码方法,如果未指定,则采用 json 的格式; T 表示存取对象的类型;
Click to show internal directories.
Click to hide internal directories.