ent

package
v0.10.30 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntClient

type EntClient[T EntTxBase] interface {
	EntClientBase
	BeginTx(ctx context.Context, opts *sql.TxOptions) (T, error)
}

type EntClientBase added in v0.9.0

type EntClientBase interface {
	Close() error
	GetSchema() EntClientSchema
	EntityClient(string) EntityClient
}

type EntClientSchema

type EntClientSchema interface {
	Create(ctx context.Context, opts ...schema.MigrateOption) error
}

Generic ent-style Schema (ent doesn't provide an interface for this)

type EntTx

type EntTx[C EntClientBase] interface {
	EntTxBase
	Client() C
}

type EntTxBase added in v0.9.0

type EntTxBase interface {
	Commit() error
	Rollback() error
}

type EntityClient

type EntityClient interface {
	CreateEntity() EntityCreate
}

type EntityCreate

type EntityCreate interface {
	EntityMutation() ent.Mutation
	SaveEntity(context.Context) (interface{}, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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