sql

hanDerPeder 2024-01-04T17:04:02.293209Z

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

✅ 1
hanDerPeder 2024-01-04T17:18:05.092289Z

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

hanDerPeder 2024-01-04T17:21:34.395239Z

(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?

seancorfield 2024-01-04T17:53:18.541259Z

Isn't JDBC wonderful? /sarcasm

😆 1