isaac-mcfadyen / d1-jdbc-driver

A JDBC driver for Cloudflare's D1 product, compatible with Jetbrains tools.
GNU General Public License v3.0
74 stars 5 forks source link

Initial 2.0 release #7

Open isaac-mcfadyen opened 4 months ago

isaac-mcfadyen commented 4 months ago

:tada: Some major changes coming to d1-jdbc-driver!

TLDR: d1-jdbc-driver now reports itself as the official sqlite driver to improve compatibility. You may need to recreate your Data Source in Datagrip after upgrading.

Major Changes

Known Issues

jabinb commented 1 month ago

Hi @isaac-mcfadyen thanks a lot for your work on this!

I built the driver locally and added it to DataGrip and created a new source to replace the existing one. However when querying a table any integer columns return this error:

<failed to load>
java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap')
    at org.isaacmcfadyen.D1ResultSet.getString(D1ResultSet.java:107)
    in JdbcHelperImpl.getObject(JdbcHelperImpl.java:337)

Also attempting to run a count on a returns a not implemented error, which I gather is expected but thought I'd mention.

main> SELECT COUNT(*)
      FROM users t
[2024-08-22 20:44:12] completed in 2 s 222 ms
[2024-08-22 20:44:12] Not implemented: getLong(int columnIndex)
isaac-mcfadyen commented 1 month ago

Hi @jabinb!

This PR is actually still in progress - when I have some free time next week I'll try and finish it up. Thank you for pointing those out though!