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
cond1 := db.Cond{"col1": "val1", "col2": "val2"} cond2 := db.Cond{"col3": "val3"} q.Where(db.Or(cond1, cond2))
expected: WHERE (col1 = val1 AND col2 = val2) OR (col3 = val3)
WHERE (col1 = val1 AND col2 = val2) OR (col3 = val3)
actual WHERE ((col1 = val1 AND col2 = val2 OR col3 = val3))
WHERE ((col1 = val1 AND col2 = val2 OR col3 = val3))
The same happens with And
The text was updated successfully, but these errors were encountered:
Add default AND join within Or. Closes #280
f7d52b9
Merge pull request #282 from upper/issue-280
b3306f0
If you want to be explicit about this (and to preserve condition order) use:
q.Where(db.Or( db.And( db.Cond{"col1": "val1"}, db.Cond{"col2": "val2"}, ), db.And( db.Cond{"col3": "val3"}, ), ))
Sorry, something went wrong.
Merge pull request #291 from upper/issue-286
678653d
No branches or pull requests
expected:
WHERE (col1 = val1 AND col2 = val2) OR (col3 = val3)
actual
WHERE ((col1 = val1 AND col2 = val2 OR col3 = val3))
The same happens with And
The text was updated successfully, but these errors were encountered: