mirror of
https://github.com/ent/ent.git
synced 2026-04-30 06:30:55 +03:00
sqlgraph: change modifiers to onconflict options
This commit is contained in:
committed by
Ariel Mashraki
parent
b19ac669c7
commit
16c4b3379b
@@ -867,10 +867,8 @@ func TestCreateNode(t *testing.T) {
|
||||
{Column: "age", Type: field.TypeInt, Value: 30},
|
||||
{Column: "name", Type: field.TypeString, Value: "a8m"},
|
||||
},
|
||||
Modifiers: []func(i *sql.InsertBuilder){
|
||||
func(i *sql.InsertBuilder) {
|
||||
i.OnConflict(sql.ResolveWithNewValues())
|
||||
},
|
||||
OnConflict: []sql.ConflictOption{
|
||||
sql.ResolveWithNewValues(),
|
||||
},
|
||||
},
|
||||
expect: func(m sqlmock.Sqlmock) {
|
||||
@@ -1215,10 +1213,8 @@ func TestBatchCreate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
Modifiers: []func(*sql.InsertBuilder){
|
||||
func(i *sql.InsertBuilder) {
|
||||
i.OnConflict(sql.ResolveWithIgnore())
|
||||
},
|
||||
OnConflict: []sql.ConflictOption{
|
||||
sql.ResolveWithIgnore(),
|
||||
},
|
||||
},
|
||||
expect: func(m sqlmock.Sqlmock) {
|
||||
|
||||
Reference in New Issue
Block a user