Fork me on GitHub
#sql
<
2024-01-04
>
hanDerPeder17:01:02

How can I get a BINARY(16) column from mariadb as a byte array?

1
hanDerPeder17:01:05

(.getColumnClassName rs-meta 2) ;; => "java.lang.String"
seems this happens in the driver

hanDerPeder17:01:34

(alength (.getBytes (.getObject rs 2))) ;; 34
(alength (.getBytes rs 2)) ;; 16
Okay, so calling .getBytes on the result-set would fix this. Why is it 34 bytes in the first case? encoding?

seancorfield17:01:18

Isn't JDBC wonderful? /sarcasm

😆 1