eclipse-vertx/vertx-sql-client

Ability to configure Row for returning booleans instead of Byte in MySQL reactive client

olofumark opened this issue · 2 comments

Describe the feature

io.vertx.sqlclient.Row needs a way to specify preference for the retrieval of all boolean columns as booleans instead of Byte.

Currently all boolean columns are served as Byte unless you explicitly call getBoolean() for individual fields.

Use cases

  1. Reading data and streaming without having to do extra conversions.
  2. Consistency with query expectations e.g after doing SELECT * FROM ... WHERE sent = true; only to be served the Byte equivalent of the boolean fields which(though might be the low level storage format) is not very helpful unless first converted.
  3. Very helpful for migrating from the legacy JDBC client if you already have frontend systems relying on true and false where they will break if suddenly served with 0's and 1's.

Thanks for reporting @olofumark

Thoughts @BillyYccc ?

I was aware of mysql jdbc providing a dedicated transformation option, I wonder maybe we could instead pick up and support the custom data type codec to cover such use cases.