regen ent with version 0.10.0

This commit is contained in:
2022-02-10 19:21:16 +01:00
parent f0ac9d6052
commit adad7c1acd
10 changed files with 90 additions and 59 deletions

View File

@@ -30,7 +30,7 @@ type Tx struct {
}
type (
// Committer is the interface that wraps the Committer method.
// Committer is the interface that wraps the Commit method.
Committer interface {
Commit(context.Context, *Tx) error
}
@@ -44,7 +44,7 @@ type (
// and returns a Committer. For example:
//
// hook := func(next ent.Committer) ent.Committer {
// return ent.CommitFunc(func(context.Context, tx *ent.Tx) error {
// return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// // Do some stuff before.
// if err := next.Commit(ctx, tx); err != nil {
// return err
@@ -85,7 +85,7 @@ func (tx *Tx) OnCommit(f CommitHook) {
}
type (
// Rollbacker is the interface that wraps the Rollbacker method.
// Rollbacker is the interface that wraps the Rollback method.
Rollbacker interface {
Rollback(context.Context, *Tx) error
}
@@ -99,7 +99,7 @@ type (
// and returns a Rollbacker. For example:
//
// hook := func(next ent.Rollbacker) ent.Rollbacker {
// return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error {
// return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// // Do some stuff before.
// if err := next.Rollback(ctx, tx); err != nil {
// return err