mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
The DX is right now pretty terrible:
```
penberg@vonneumann turso % cargo run -- hello.db
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
Running `target/debug/tursodb hello.db`
Turso v0.4.0-pre.18
Enter ".help" for usage hints.
Did you know that Turso supports live materialized views? Type .manual materialized-views to learn more.
This software is in BETA, use caution with production data and ensure you have backups.
turso> PRAGMA journal_mode = 'experimental_mvcc';
× Invalid argument supplied: MVCC is not enabled. Enable it with `--experimental-mvcc` flag in the CLI or by setting the MVCC option in `DatabaseOpts`
turso>
```
To add insult to the injury, many SDKs don't even have a way to enable
MVCC via database options. Therefore, let's remove the flag altogether.
|
||
|---|---|---|
| .. | ||
| example | ||
| gradle | ||
| rs_src | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .sdkmanrc | ||
| build.gradle.kts | ||
| Cargo.toml | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| Makefile | ||
| README.md | ||
| settings.gradle.kts | ||
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,
JDBC4Connectiondoesn't implementTursoConnection. Instead, it includesTursoConnectionas a field. This approach allows us to preserve the characteristics of Turso usingTursoConnectioneasily while maintaining interoperability with the Java world usingJDBC4Connection.