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
where:=map[string]interface{}{"column2":""} setmap:=map[string]interface{}{"column1":"column1 + 1"} // UpdateWorkProperties func UpdateWorkProperties(ctx context.Context, runner sq.BaseRunner, where interface{}, setmap map[string]interface{}) error { logger.Info("UpdateItemNoStatus sq tosql=====================") logger.Info(sq.Update(tableWorkProperties).SetMap(setmap).Where(where).Limit(1).ToSql()) logger.Info("UpdateItemNoStatus sq tosql======================") _, err := sq.Update(tableWorkProperties). SetMap(setmap). Where(where). Limit(1). RunWith(runner). ExecContext(ctx) return err }
{"level":"info","msg":"UpdatePropertiesCurrentNo sq tosql=====================","time":"2023-03-14 11:20:49"} {"level":"info","msg":"UPDATE property_origin SET item_no_current = ? WHERE work_id = ? LIMIT 1[item_no_current + 1 1123031318403700117600000108] \u003cnil\u003e","time":"2023-03-14 11:20:49"} {"level":"info","msg":"UpdatePropertiesCurrentNo sq tosql======================","time":"2023-03-14 11:20:49"}
item_no_current=0
The text was updated successfully, but these errors were encountered:
Try:
setmap := sq.Eq{"column1": sq.Expr("column1 + 1")}
Sorry, something went wrong.
No branches or pull requests
squirrel
squirrel trans to sql string log
mysql table effect
item_no_current=0
The text was updated successfully, but these errors were encountered: