func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error {
	return f(ctx, tx)
}
Commit calls f(ctx, m).
package ent
import (
	"context"
	"sync"
	"entgo.io/ent/dialect"
)
type Tx struct {
	config
	Category *CategoryClient
	Todo *TodoClient
	VerySecret *VerySecretClient
	client     *Client
	clientOnce sync.Once
	mu         sync.Mutex
	onCommit   []CommitHook
	onRollback []RollbackHook
	ctx context.Context
}
type (
	Committer interface {
		Commit(context.Context, *Tx) error
	}
	CommitFunc func(context.Context, *Tx) error
	CommitHook func(Committer) Committer
)