jsonsliceent

package module
v0.0.0-...-b178b83 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

Overview

Package jsonsliceent provides an ent.Field constructor for github.com/ubgo/jsonslice.JsonSlice columns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Field

func Field(name string) ent.Field

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(...)

Types

This section is empty.

Jump to

Keyboard shortcuts

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