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
When I try to use the CASE WHEN statement with squirrel to update a column based on multiple conditions, I get the following error:
expected string or Sqlizer, not int
package main import ( "fmt" sq "github.com/Masterminds/squirrel" ) func main() { amountExpr := sq.Case("order_no"). When("ORD001", 500). When("ORD002", 600) sql, _, err := sq.Update("orders"). Set("amount", amountExpr). Where(sq.Eq{"order_no": []string{"ORD001", "ORD002", "ORD003"}}). ToSql() if err != nil { fmt.Println("Error:", err) return } fmt.Println("Generated SQL:", sql) }
Thank you! 🙏 Would appreciate any insights or guidance on this issue. 😊
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I try to use the CASE WHEN statement with squirrel to update a column based on multiple conditions, I get the following error:
expected string or Sqlizer, not int
Thank you! 🙏 Would appreciate any insights or guidance on this issue. 😊
The text was updated successfully, but these errors were encountered: