Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial 2.0 release #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Initial 2.0 release #7

wants to merge 2 commits into from

Conversation

isaac-mcfadyen
Copy link
Owner

🎉 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

  • For improved compatibility, d1-jdbc-driver reports itself as the official SQLite driver:
    • More features are supported/stable without much extra work, including foreign keys, indexes, SQLite datatypes, etc.
    • The driver will now appear as "SQLite" in the Data Source configuration window and have a SQLite icon. This is normal.
    • You will may need to recreate your Data Source in Datagrip after the upgrade.
  • The internal _cf_KV table is no longer visible in the table browser as it's not meant to be accessed by the user.
  • Configuration validation logic is improved with better error messages if an invalid database ID or invalid credentials are provided.
  • Dependencies have been upgraded which fixes various security issues.

Known Issues

  • d1-jdbc-driver is not aware of SQLite extensions and may not show autocomplete for full-text search, JSON, and other extensions and functions. This may be added in the future.
  • Initial database introspection may be slightly slower because Datagrip assumes the database is local and makes a lot of initial introspection queries. Non-introspection queries should have similar latency as 1.0.

@jabinb
Copy link

jabinb commented Aug 22, 2024

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
Copy link
Owner Author

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!

@Shannor
Copy link

Shannor commented Nov 18, 2024

How can we test it out? I would like to try it too, to see if it fixes this issue as well #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants