A JDBC driver for Cloudflare's D1 product, compatible with Jetbrains tools.

Overview

D1 JDBC Driver

A JDBC driver for Cloudflare's D1 Database product!

JDBC is the technology that drives popular database tools such as Jetbrains' database functionality integrated into their editors and Datagrip, their standalone DB editor.

These tools all require a JDBC driver, an adapter that interfaces between the GUI and the Database.

The D1 JDBC Driver interfaces between these IDEs and Cloudflare's D1, and provides:

  • 🔍 Powerful and automatic schema introspection capabilities
  • ✍️ SQL statement execution, along with auto-formatted results
  • 🔠 Support for all of the Datatype Affinities that SQLite supports (NUMERIC, TEXT, etc)

Known issues:

  • Editing data directly via the table-like interface is not supported. Editing data via SQL is still supported.
  • Foreign keys are not currently shown in the introspection window, although they are still there and working as normal.

For more info and to get help, join us on the Cloudflare Developers Discord!

Installation instructions:

  1. Download the latest release of the D1 JDBC Driver from here.
  2. Move the .jar file to somewhere on your computer where you can store it permanently.
  3. Open Datagrip (or another Jetbrains tool) and add a new Database Driver. (Figure 1)
  4. Name it D1 JDBC Driver. Click on the plus sign beside Driver Files, select Custom JARs, then navigate to and choose the downloaded .jar file.
  5. Select org.isaacmcfadyen.D1Driver from the dropdown. (Figure 2)
  6. Go to the Options tab, scroll down to the bottom, and change the Dialect to SQLite. This is required for proper auto-complete functionality. (Figure 3)
  7. Go to the Data Sources panel, add a new Data Source, and select D1 JDBC Driver as the source. (Figure 4)
  8. Enter the URL, in the format jdbc:d1://<UUID> where <UUID> is the ID of the D1 database you were given at creation. For the User field, enter your Cloudflare Account ID, and for the Password field enter an API Token with the D1 Edit scope. (Figure 5)
  9. Hit Test Connection. If all is good, you should see a green message saying that the connection succeeded! If it failed, try going back through these steps and making sure you didn't make a typo. If you need help, join us on the Cloudflare Developers Discord. (Figure 6)

Figure 1:
Figure 1

Figure 2:
Selecting Driver Class

Figure 3:
Selecting Dialect

Figure 4:
Selecting Data Source

Figure 5:
Example of Authentication

Figure 6:
Connection Succeeded

You might also like...

Core ORMLite functionality that provides a lite Java ORM in conjunction with ormlite-jdbc or ormlite-android

ORMLite Core This package provides the core functionality for the JDBC and Android packages. Users that are connecting to SQL databases via JDBC shoul

Dec 25, 2022

SPRING MySQL Database Connection using JDBC STEPS

SPRING-MySQL-Database-Connection-using-JDBC-STEPS SPRING MySQL Database Connection using JDBC STEPS Step1: Create maven project Group id: com.cdac Art

Jan 27, 2022

Amazon AppFlow Custom JDBC Connector example

 Amazon AppFlow Custom JDBC Connector example

Amazon AppFlow Custom JDBC Connector example This project contains source code and supporting files that implements Amazon Custom Connector SDK and re

Oct 26, 2022

Online Quiz system - JDBC, JSP

Online-Quiz-System-in-Java Online Quiz system - JDBC, JSP Java Project based on JDBC, JSP, Java Servlet and Server Deployment Project Aim Develop web

Oct 14, 2022

Hi, Spring fans! In this installment, we'll look at how to build tenancy-aware JDBC applications

Multitenant JDBC You'll need to spin up two separate PostgreSQL instances. Put this script into a file called postgres.sh: #!/usr/bin/env bash NAME=${

Nov 7, 2022

esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.

esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.

esProc esProc is the unique name for esProc SPL package. esProc SPL is an open-source programming language for data processing, which can perform comp

Dec 27, 2022

A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs.

HiddenApiRefinePlugin A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs. Backgr

Jan 5, 2023

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack

Dec 14, 2022

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack

Mar 12, 2021

JDBC driver for ClickHouse

This is a basic and restricted implementation of jdbc driver for ClickHouse. It has support of a minimal subset of features to be usable.

Jan 1, 2023

Java time series machine learning tools in a Weka compatible toolkit

UEA Time Series Classification A Weka-compatible Java toolbox for time series classification, clustering and transformation. For the python sklearn-co

Nov 7, 2022

Accessible GUI-driven robot programming for your product

Accessible GUI-driven robot programming for your product

Accessible GUI-driven robot programming for your product Description Roblocks is an accessible Graphical Programming Tool which enables basic robot pr

Sep 19, 2022

This repository contains the source code for a Product Comparison solution

This repository contains the source code for a Product Comparison solution

Product Comparison Installation Guide This repository contains the source code for a Product Comparison solution. Please report any issues here. Insta

Dec 5, 2022

Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method

Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method, which can be used to restore the entire database to a specific point in time to help users improve the reliability and security of the database

Nov 29, 2022

GMC-Tools - Plugin with basic tools for Minecraft server administrator

GMC-Tools - Plugin with basic tools for Minecraft server administrator. Currently we do not support configuration files and we do not recommend using this plugin on production servers.

Jan 14, 2022

jQuery-like cross-driver interface in Java for Selenium WebDriver

seleniumQuery Feature-rich jQuery-like Java interface for Selenium WebDriver seleniumQuery is a feature-rich cross-driver Java library that brings a j

Nov 27, 2022

Automated driver management for Selenium WebDriver

Automated driver management for Selenium WebDriver

WebDriverManager is a library which allows to automate the management of the drivers (e.g. chromedriver, geckodriver, etc.) required by Selenium WebDr

Dec 30, 2022
Comments
  • Columns not showing up

    Columns not showing up

    I added this driver to my WebStorm to be able to look inside my D1 database as I started to develop.

    When I got to my second table, no columns was showing up, only one key representing the PK. This also means that all the database references for columns, etc, will be marked as invalid in the code.

    I verified that my table was indeed created and correct by running the command wrangler d1 execute DB --command "pragma table_info('table_name')".

    The driver is outputting no messages, no errors.

    opened by Yrlish 0
Releases(v1.1)
Owner
Isaac McFadyen
Isaac McFadyen
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack

JetBrains 858 Mar 12, 2021
JDBC driver for ClickHouse

This is a basic and restricted implementation of jdbc driver for ClickHouse. It has support of a minimal subset of features to be usable.

ClickHouse 1.1k Jan 1, 2023
R2DBC Driver for Oracle Database

About Oracle R2DBC The Oracle R2DBC Driver is a Java library that supports reactive programming with Oracle Database. Oracle R2DBC implements the R2DB

Oracle 159 Dec 13, 2022
An unofficial edition of ja-netfilter which has built-in plugins for activating JetBrains IDE.

jb-netfilter v2.0.1 An unofficial edition of ja-netfilter which has built-in plugins for activating JetBrains IDE. Usage download from the releases pa

EFL 29 Apr 3, 2022
Java & Kotlin Async DataBase Driver for MySQL and PostgreSQL written in Kotlin

jasync-sql is a Simple, Netty based, asynchronous, performant and reliable database drivers for PostgreSQL and MySQL written in Kotlin. Show your ❤ wi

null 1.5k Dec 31, 2022
光 HikariCP・A solid, high-performance, JDBC connection pool at last.

HikariCP It's Faster.Hi·ka·ri [hi·ka·'lē] (Origin: Japanese): light; ray. Fast, simple, reliable. HikariCP is a "zero-overhead" production ready JDBC

Brett Wooldridge 17.7k Jan 1, 2023
Vibur DBCP - concurrent and dynamic JDBC connection pool

Vibur DBCP is concurrent, fast, and fully-featured JDBC connection pool, which provides advanced performance monitoring capabilities, including slow S

Vibur 94 Apr 20, 2022
Multi-DBMS SQL Benchmarking Framework via JDBC

BenchBase BenchBase (formerly OLTPBench) is a Multi-DBMS SQL Benchmarking Framework via JDBC. Table of Contents Quickstart Description Usage Guide Con

CMU Database Group 213 Dec 29, 2022
Provides many useful CRUD, Pagination, Sorting operations with Thread-safe Singleton support through the native JDBC API.

BangMapleJDBCRepository Inspired by the JpaRepository of Spring framework which also provides many capabilities for the CRUD, Pagination and Sorting o

Ngô Nguyên Bằng 5 Apr 7, 2022