You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
db.query('SELECT CASE WHEN EXISTS(SELECT gitterhandle FROM users WHERE gitterhandle = $1) THEN CAST (true AS BOOLEAN) ELSE CAST (false AS BOOLEAN) END',[gitterhandle]);
In this query:
pulp-faction/src/controllers/queries.js
Line 4 in 7a8d71c
You're using a
CASE
statement to return a boolean, when your condition already returns a boolean. This is analogous to:Simpler would be
return x == y;
. In the case of your query, you can get rid of theCASE
statement and just useEXISTS
directly.The text was updated successfully, but these errors were encountered: