We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cond, vals, err := builder.BuildInsert("testTable", data) if nil != err { return 0, err } result, err := db.Exec(cond, vals...)
最后执行 db.Exec(cond, vals...)的时候有错误产生 我用的是mysql data:<*errors.errorString> s:"sql: converting argument $1 type: unsupported type []map[string]...+28 more"
The text was updated successfully, but these errors were encountered:
方便贴一下你的data的值是什么吗,顺便把cond 和vals也贴一下下谢谢
Sorry, something went wrong.
@vstTang 看起来应该是你data里的值有问题,这个gendry目前没有帮你做检查。 data需要类似这样才行:
data = []map[string]interface{}{ map[string]interface{}{ "foo": intValue, "bar": stringValue, "baz": floatValue, }, map[string]interface{}{ "foo": intValue, "bar": stringValue, "baz": floatValue, }, }
map的值必须是值类型,不能是复杂类型,下面这种是不合法的
data = []map[string]interface{}{ map[string]interface{}{ "foo": mapValue, "bar": arrayValue, "baz": structValue, }, }
如果没有其它问题的话,我暂时先关闭这个issue了
No branches or pull requests
最后执行 db.Exec(cond, vals...)的时候有错误产生 我用的是mysql
data:<*errors.errorString>
s:"sql: converting argument $1 type: unsupported type []map[string]...+28 more"
The text was updated successfully, but these errors were encountered: