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
I noticed something weird why can't we use ? in column name? sql, args, err := sb.Select("test").Where("y = ?", 2).ToSql() OK but sql, args, err := sb.Select("test").Where("? = ?","y", 2).ToSql() error
sql, args, err := sb.Select("test").Where("y = ?", 2).ToSql()
sql, args, err := sb.Select("test").Where("? = ?","y", 2).ToSql()
this also happens in sq.Expr
The text was updated successfully, but these errors were encountered:
Hey! Encountered the same issue when passing two arguments to SelectBuilder.Where.
SelectBuilder.Where
For example:
testQuery := sq.Select("test"). From("test"). Where("? = ?", 1, 2) query, args, err := testQuery.ToSql() fmt.Printf("query: %s\n", query) fmt.Printf("args: %v\n", args)
query: SELECT test FROM test WHERE ? = ? args: [1 2]
This is the error I get.
*errors.errorString have no arg for param ? at position 1
This doesn't happen with SelectBuilder.Having for example.
SelectBuilder.Having
Sorry, something went wrong.
Turns out I was not passing args as a slice in the follow-up implementation. The issue was not related to this library. My bad!
args
No branches or pull requests
I noticed something weird why can't we use ? in column name?
sql, args, err := sb.Select("test").Where("y = ?", 2).ToSql()
OKbut
sql, args, err := sb.Select("test").Where("? = ?","y", 2).ToSql()
error
this also happens in sq.Expr
The text was updated successfully, but these errors were encountered: