Displaying MySQL bit, tinyint columns as boolean type

I'm using datagrip as the plugin of intellij 2022.3.1.

Currently datagrip seems to show the select query result values of two column types for MySQL differently:

  • bit -> true/false
  • tinyint -> 0/1 (number)

This is the table schema:

and this is the query result:

same result on mysql client console:

According to the mysql references, mysql recognizes the keyword bool / boolean as aliases of type tinyint(1), and `true` / `false` as literals of 1 / 0. So technically, numeric values from tinyint column should rather be treated as boolean values than bit values from bit column.

But currently datagrip treats them the opposite: bit as boolean, and tinyint as numeric value.

There should be reason that I don't know yet, so I would like to hear it, and if so, I'd like datagrip to have some option to control the way of displaying certain types of values. It'd be good if I'm able to turn on and off to show tinyint as boolean. Will that be possible?

There is a relevant post mentioning mysql boolean so I put it as a reference below, but the point is different of this post.



Please sign in to leave a comment.