Open gavinking opened 4 years ago
OK, so in io.vertx.db2client.impl.drda.ClientTypes
we have:
case ClientTypes.BLOB:
return clazz == byte[].class ||
ByteBuf.class.isAssignableFrom(clazz);
So there doesn't seem to be any support for Buffer
there.
But if you look in the DataTypeCodec
classes for Postgres and MySQL, they both map BYTEA
/BLOB
to Buffer
.
CC: @aguibert
Just discovered that this is also the reason UUIDGeneratorTest
fails on DB2.
I wanted to keep the io.vertx.db2client.impl.drda
free of any Vertx dependencies, so that I could eventually split it out to write other DB2 clients with that code in the future if needed. Since Buffer
is Vertx class I think I checked for it a layer up from that method.
In any case, for BLOB to actually work I'd need to implement a lot more code in the codec layer, so unfortunately it would be much more involved than just fixing this codepath.
I wanted to keep the
io.vertx.db2client.impl.drda
free of any Vertx dependencies, so that I could eventually split it out to write other DB2 clients with that code in the future if needed. SinceBuffer
is Vertx class I think I checked for it a layer up from that method.
I don't think so, or we wouldn't be seeing this error.
In any case, for BLOB to actually work I'd need to implement a lot more code in the codec layer, so unfortunately it would be much more involved than just fixing this codepath.
Yes I saw that now, but it's not just BLOB this problem applies to: the same thing happens with BINARY.
Just discovered that this is also the reason
UUIDGeneratorTest
fails on DB2.
@aguibert check out the above test, where the failure has nothing to do with LOBs.
For
@Lob @Column(length = 100_000) protected byte[] pic
I get the following error:This looks like something fixable.