mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 19:44:21 +01:00
We currently have two value types, `Value` and `OwnedValue`. The original thinking was that `Value` is external type and `OwnedValue` is internal type. However, this just results in unnecessary transformation between the types as data crosses the Limbo library boundary. Let's just follow SQLite here and consolidate on a single value type (where `sqlite3_value` is just an alias for the internal `Mem` type). The way this will eventually work is that we can have bunch of pre-allocated `OwnedValue` objects in `ProgramState` and basically return a reference to them all the way to the application itself, which extracts the actual value.
Limbo JDBC Driver
The Limbo JDBC driver is a library for accessing and creating Limbo 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`
$ make macos_x86
# deploy to maven local
$ make publish_local
Now you can use the dependency as follows:
dependencies {
implementation("tech.turso:limbo:0.0.1-SNAPSHOT")
}
Code style
- Favor composition over inheritance. For example,
JDBC4Connectiondoesn't implementLimboConnection. Instead, it includesLimboConnectionas a field. This approach allows us to preserve the characteristics of Limbo usingLimboConnectioneasily while maintaining interoperability with the Java world usingJDBC4Connection.