package
module
Version:
v0.0.0-...-b178b83
Opens a new window with list of versions in this module.
Published: May 4, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
jsonslice-ent
Ent field helper for github.com/ubgo/jsonslice.
Install
go get github.com/ubgo/jsonslice-ent
Use
import (
"entgo.io/ent"
jsonsliceent "github.com/ubgo/jsonslice-ent"
)
type Event struct{ ent.Schema }
func (Event) Fields() []ent.Field {
return []ent.Field{
jsonsliceent.Field("tags"),
}
}
For finer control compose field.JSON("tags", jsonslice.JsonSlice{}).Optional()... directly.
License
Apache-2.0 — see LICENSE.
Documentation
¶
Package jsonsliceent provides an ent.Field constructor for
github.com/ubgo/jsonslice.JsonSlice columns.
Field returns an ent.Field for a jsonslice.JsonSlice column. The
column is stored as JSON / JSONB at the SQL layer.
For Optional, Immutable, dialect-specific column type, etc., compose
directly:
field.JSON("tags", jsonslice.JsonSlice{}).Optional().SchemaType(...)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.