mirror of
https://github.com/ent/ent.git
synced 2026-04-28 13:40:56 +03:00
entc/gen: support Append<F> for JSON array fields (#2975)
This commit is contained in:
@@ -415,6 +415,16 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
// AddModifier adds a new statement modifier to the spec.
|
||||
func (u *UpdateSpec) AddModifier(m func(*sql.UpdateBuilder)) {
|
||||
u.Modifiers = append(u.Modifiers, m)
|
||||
}
|
||||
|
||||
// AddModifiers adds a list of statement modifiers to the spec.
|
||||
func (u *UpdateSpec) AddModifiers(m ...func(*sql.UpdateBuilder)) {
|
||||
u.Modifiers = append(u.Modifiers, m...)
|
||||
}
|
||||
|
||||
// UpdateNode applies the UpdateSpec on one node in the graph.
|
||||
func UpdateNode(ctx context.Context, drv dialect.Driver, spec *UpdateSpec) error {
|
||||
tx, err := drv.Tx(ctx)
|
||||
|
||||
Reference in New Issue
Block a user