limbo/bindings/java
Pekka Enberg 68060dabe2 Merge 'bindings/java: Implement required methods to run on JetBrains Datagrip' from Kim Seon Woo
Now, you can upload driver zar to Datagrip and use Turso database.
<img width="852" alt="image" src="https://github.com/user-
attachments/assets/27b071c3-bef7-4c4a-926d-9225de3c5a5b" />
## How to set up
### Build jar file
command: `make libs && make publish_local`
- this will build and put your jar file under `~/.m2/...`
### Register driver
![image](https://github.com/user-
attachments/assets/3420dcf6-ebda-4444-b9c4-99ed23c76917)
### Set up datasource
![image](https://github.com/user-
attachments/assets/6e87e10c-9d58-4956-8d5c-e4fc6830d83d)

Closes #1971
2025-07-08 10:23:14 +03:00
..
example bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
gradle/wrapper Add support Java bindings 2025-01-05 10:28:05 +02:00
rs_src make all run_once be run under statement or connection so that rollback is called 2025-07-07 11:51:25 -03:00
src nit 2025-07-06 17:15:41 +09:00
.gitignore bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
build.gradle.kts bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
Cargo.toml bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
gradle.properties Change package name from org.github.tursodatabase to tech.turso 2025-02-12 09:58:25 +09:00
gradlew Add support Java bindings 2025-01-05 10:28:05 +02:00
gradlew.bat Add support Java bindings 2025-01-05 10:28:05 +02:00
Makefile bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
README.md bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
settings.gradle.kts bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00

Turso JDBC Driver

The Turso JDBC driver is a library for accessing and creating Turso database files using Java.

Project Status

The project is actively developed. Feel free to open issues and contribute.

To view related works, visit this issue.

How to use

Currently, we have not published to the maven central. Instead, you can locally build the jar and deploy it to maven local to use it.

Build jar and publish to maven local

$ cd bindings/java

# Please select the appropriate target platform, currently supports `macos_x86`, `macos_arm64`, `windows` and `linux_x86`
$ make macos_x86

# deploy to maven local
$ make publish_local

Now you can use the dependency as follows:

dependencies {
    implementation("tech.turso:turso:0.0.1-SNAPSHOT")
}

Code style

  • Favor composition over inheritance. For example, JDBC4Connection doesn't implement TursoConnection. Instead, it includes TursoConnection as a field. This approach allows us to preserve the characteristics of Turso using TursoConnection easily while maintaining interoperability with the Java world using JDBC4Connection.