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
db.Update("customer", dbx.Params{"name":json.Name, "age":json.Age}, dbx.HashExp{"id": userId}).Execute()
how can i get update rows
The text was updated successfully, but these errors were encountered:
如何得到更新的行数?
Sorry, something went wrong.
Look at the description of Execute, it says Execute executes the SQL statement without retrieving data.
Execute
Use something like this: db.Update("customer", dbx.Params{"name":json.Name, "age":json.Age}, dbx.HashExp{"id": userId}).All(&m)
db.Update("customer", dbx.Params{"name":json.Name, "age":json.Age}, dbx.HashExp{"id": userId}).All(&m)
use either this: .All(), .One(), .Column(), .Row(), .Rows()
.All(), .One(), .Column(), .Row(), .Rows()
@fancyecommerce You can use follow code
result, _:= db.Update("customer", dbx.Params{"name":json.Name, "age":json.Age}, dbx.HashExp{"id": userId}).Execute() result.RowsAffected()
No branches or pull requests
how can i get update rows
The text was updated successfully, but these errors were encountered: