-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
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
CASE expression and integer typing #97
Comments
SUM(
CAST(CASE .....).AS_INTEGER(),
) |
That worked! Thank you very much. |
With the Release 2.7.0, expression casting can be avoided by using one of the bit specific integer literal constructor - Int8, Uint8, Int16 etc... err := SELECT(SUM(CASE().WHEN(Benchmark.Passed.IS_TRUE()).
THEN(Int32(1)).
ELSE(Int32(0))).AS("num_passed")).
FROM(Benchmark).
Query(tx, &dest) |
The following go-jet code is giving the error below on Postgres:
It seems like its interpreting the CASE expression as a string when it should interpret it as Int. When I print out the SQL statement using DebugSql() and copy/paste it directly into Postgres's client, it works correctly. But through go-jet, I get the error above.
The text was updated successfully, but these errors were encountered: