Open lenonqing opened 3 years ago
@lenonqing you can call bulk upset with []map[string]interface{}
directly. It works if you need quick solution.
q := "INSERT INTO role(type,value) VALUES (:type, :value)"
pp := []map[string]interface{}{
{"type": "type1", "value": "val1"},
{"type": "type2", "value": "val2"},
{"type": "type3", "value": "val3"},
}
res, err := db.NamedExec(q, pp)
it'd be nice to fix this. if you put anything after the VALUES(...)
segment, the bulk insert seems to fail. This makes it impossible to use any ON CONFLICT ...
forms of the insert.
Any update on this?
Any update on this?
I think version >= 1.3.4 should already fixed this
yes, version >= 1.3.4 is ok.
I can confirm, this works on v1.3.5!
Maybe close this issue?
I got the same problem with 1.3.5 version. Error: mismatched param and argument count
same problem on 1.4.0
in v 1.3.3
got
sql: expected 5 arguments, got 10
error.