vertx-sql-client icon indicating copy to clipboard operation
vertx-sql-client copied to clipboard

BLOB or BINARY types and Buffer on DB2

Open gavinking opened this issue 3 years ago • 3 comments

As reported here, a parameter of type Buffer cannot be used as a parameter of type BLOB or BINARY on the DB2 client. This does work on both Postgres and MySQL.

The error is:

Parameter at position[1] with class = [io.vertx.core.buffer.impl.BufferImpl] and value = [...] can not be coerced to the expected class = [io.netty.buffer.ByteBuf] for encoding.

(More info in the linked HR issue.)

gavinking avatar Aug 03 '20 13:08 gavinking

Oh, now I also see that there is some commented code in DRDAQueryRequest.computeProtocolTypesAndLengths() for BLOB and CLOB types, that makes me suspect that there is simply no support for BLOB and CLOB currently?

Right, now I see in the docs that BLOB and CLOB aren't supported yet.

But this issue with Buffer is still a separate thing, since it also affects BINARY, which is supposed to be supported.

gavinking avatar Aug 03 '20 13:08 gavinking

right, BLOB and CLOB are not supported and will take me some time to get working. TBH I'm waiting for a bit more usage of the DB2 driver to see if a user asks for BLOB/CLOB. That effort is already tracked under #496

Lets re-purpose this issue for the Buffer/BINARY bug you ran into. I'll see if I can look into that in time for Vertx 3.9.3

aguibert avatar Aug 18 '20 14:08 aguibert

Lets re-purpose this issue for the Buffer/BINARY bug you ran into. I'll see if I can look into that in time for Vertx 3.9.3

Great, thanks.

gavinking avatar Aug 18 '20 14:08 gavinking