Commit Graph

345 Commits

Author SHA1 Message Date
Yirt Grek
bb68fbdd67 bindings/rust: Fix bindings so example runs 2025-03-12 00:54:18 -07:00
Pekka Enberg
96175cccf7 cli: Add --experimental-mvcc option to enable MVCC 2025-03-06 10:16:42 +02:00
Pere Diaz Bou
e4a8ee5402 move load extensions to Connection
Extensions are loaded per connection and not per database as per SQLite
behaviour. This also helps with removing locks.
2025-03-05 14:07:48 +01:00
Pere Diaz Bou
8daf7666d1 Make database Sync + Send 2025-03-05 14:07:48 +01:00
Pere Diaz Bou
205cd148ca Merge 'Enable local file connection in Rust binding' from 南宫茜
It's so weird that other bindings can open local file but Rust binding
itself cannot.

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1095
2025-03-05 14:05:35 +01:00
Pekka Enberg
49b75d33ba Limbo 0.0.16 2025-03-05 13:46:17 +02:00
南宫茜
71921ee178 Enable local file connection in Rust binding
It's so weird that other bindings can open local file but Rust binding itself cannot.
2025-03-05 17:38:23 +08:00
김선우
412bdf5585 Apply cargo formatting 2025-03-03 21:55:10 +09:00
김선우
f8052a9860 Implement totalChanges 2025-03-03 14:35:23 +09:00
김선우
6b223421ae Extract LimboPropertiesHolder 2025-03-03 14:35:23 +09:00
Pekka Enberg
50f9cc449c bindings/rust: Fix complaints about non-Sync/Send use of Arc
We probably should drop the `Rc` from `Connection` in the core, but
let's paper over it for now.
2025-02-27 10:43:58 +02:00
Pekka Enberg
08c1dce549 bindings/rust: Improve API support
Add support for Statement::query() and others to wire up more of Limbo
core to the Rust bindings.
2025-02-27 10:38:16 +02:00
Pekka Enberg
98e3bc0c0c bindings/rust: Make library thread-safe 2025-02-27 10:22:22 +02:00
Pekka Enberg
f0b29167cd bindings/rust: Fix Database::connect() signature
We don't want to consume `self`...
2025-02-27 10:10:51 +02:00
PThorpe92
6a919ac691 Remove uri parsing in go bindings because it has been added in core 2025-02-26 10:17:26 -05:00
Pekka Enberg
936ae307b7 core: Kill value type
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.
2025-02-26 10:57:45 +02:00
김선우
a99c4e2073 Nit 2025-02-19 22:38:38 +09:00
김선우
a28242a6b6 JDBC4ResultSet add ResultSetMetadata implementation 2025-02-19 22:29:44 +09:00
김선우
9e9c65d17d Add final 2025-02-19 22:27:51 +09:00
Pekka Enberg
185826f9f9 bindings/rust: Add description to Cargo.toml 2025-02-18 19:38:36 +02:00
Pekka Enberg
d0b5aca0b5 build: Don't publish some bindings crates
...attempt to fix "cargo dist" failure.
2025-02-18 19:00:11 +02:00
Pekka Enberg
6bd7d6752e Limbo 0.0.15 2025-02-18 18:51:39 +02:00
Pekka Enberg
ac54c35f92 Switch to workspace dependencies
...makes it easier to specify a version, which is needed for `cargo publish`.
2025-02-12 17:28:04 +02:00
Pekka Enberg
d1e8bb986f Fix RustDoc imports 2025-02-12 17:17:33 +02:00
Pekka Enberg
2e5fc62c45 bindings/rust: Add example.rs 2025-02-12 16:55:05 +02:00
Pekka Enberg
0b83e98031 bindings/rust: Make "limbo_core" workspace dependency 2025-02-12 16:53:41 +02:00
Pekka Enberg
c612b0932e bindings/rust: Rename crate to "limbo" 2025-02-12 16:49:53 +02:00
Pekka Enberg
e4d4e5cd5d Merge 'Streamline dependencies to build for all wasm targets' from Doug A
In order [experimentally
compile](https://github.com/DougAnderson444/wit-limbo) `limbo_core` to a
[wasm component](https://component-model.bytecodealliance.org/), limbo
needed to have no reliance on `js`, `js-sys`, `wasm-bindgen`, et al.
(for those who aren't familiar, there are many `wasm` runtimes and not
all of them play nice with `wasm-bindgen`)
This PR simply cleans up the dependencies, and puts them behind optional
flags and whatnot in order to enable this. Both `log` and `tracing` were
being used, so I reduced this only to `tracing`.
End result is limbo can be used like this:
https://github.com/DougAnderson444/wit-limbo
We can open a discussion on the possibilities that running limbo as a
wasm component can offer, including potentially using composable
components to implement the sqlite runtime extensions, as well as giving
us a clean interface for PlatformIO operations -- define them once,
implement many ways on various platforms. I'm new to limbo, but it looks
like current extension are Rust based deps and features flags, whereas
sqlite is runtime, right? What if limbo was runtime extensible too?
The WIT interface is largely sync (though I believe wasmtime has an
async feature), but in my limited exposure to limbo so far a lot of the
wasm seems sync already anyway. Again, topic for further discussion.
Suffice to say, aligning these deps in this way paves the road for
further experiments and possibilities.
Related: https://github.com/neilg63/julian_day_converter/pull/2
Related: https://github.com/tursodatabase/limbo/issues/950
Closes: https://github.com/tursodatabase/limbo/issues/950

Closes #983
2025-02-12 09:24:04 +02:00
김선우
14280680c0 Apply rust lint 2025-02-12 10:36:43 +09:00
김선우
cb7bd3d211 Change package name from org.github.tursodatabase to tech.turso 2025-02-12 09:58:25 +09:00
Doug Anderson444
1903914688 add js feature to nodejs build 2025-02-11 12:13:46 -04:00
wyhaya
351a032cc1 core: Add default column name 2025-02-11 07:03:51 +00:00
김선우
29e023ac79 Merge branch 'main' into java-bindings-database-metadata 2025-02-10 23:00:02 +09:00
Pekka Enberg
fa883d1c6b Merge 'bindings/java: Refactor to favor composition over inheritance ' from Kim Seon Woo
## Changes
- AS-IS
  - `LimboConnection` implements `Connection`
  - `JDBC4Connection` implements `LimboConnection`
- TO-BE
  - `LimboConnection` doesn't implement `Connection`. It is used to
represent connection to limbo only.
  - `JDBC4Connection` implements `Connection` directly. Holds
`LimboConnection` in member field.
- This helps remove the complexity of java's `Connection` interface away
from `LimboConnection`. We can focus on implementing limbo's feature
inside `LimboConnection` and let `JDBC4Connection` handle the
interoperability with jdbc world.
## Reference
https://github.com/tursodatabase/limbo/issues/615

Closes #916
2025-02-10 12:13:30 +02:00
Pekka Enberg
0638550be7 Merge 'Remove unnecessary reference counting from completion I/O callbacks' from Preston Thorpe
I am on a bit of a mission to revisit a lot of the ref counting, this
was an easy first win.
It seems to be a linear path of function calls or hashmaps which can own
the completions directly, no cloning needed.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #912
2025-02-10 12:11:30 +02:00
Tiago Ribeiro
c69d69a3a2 Update python bindings to use the new retrieval methods to access Record values. 2025-02-10 00:27:51 -07:00
Tiago Ribeiro
4b67e67b31 Update wasm bindings to use the new retrieval methods to access Record values. 2025-02-10 00:27:51 -07:00
Tiago Ribeiro
729524efbd Update java bindings to use the new retrieval methods to access Record values. 2025-02-10 00:27:51 -07:00
Tiago Ribeiro
13504faf18 Update go bindings to use the new retrieval methods to access Record values. 2025-02-10 00:27:51 -07:00
김선우
d515513068 Remove unused symbols after merge conflict resolution 2025-02-10 08:35:06 +09:00
김선우
0eb5c7e4ba Merge branch 'main' into java-bindings-statement-refactor 2025-02-10 07:41:54 +09:00
Aarni Koskela
eaea02c567 Fix a handful of typos 2025-02-09 18:08:29 +02:00
Pekka Enberg
e3eb2f1a9a Merge 'bindings/java: Remove AbstractDB ' from Kim Seon Woo
## Purpose of this PR
- Remove `AbstractDB` and put limbo db related methods into `LimboDB`
## Changes
- Remove `AbstractDB`
- Implement `close()`
## Reference
- [Issue](https://github.com/tursodatabase/limbo/issues/615)

Closes #946
2025-02-09 17:36:48 +02:00
김선우
2fa3a1e6ae Apply lint 2025-02-09 22:46:48 +09:00
김선우
e0b0a667bb Implement close 2025-02-09 18:40:50 +09:00
김선우
d51c1dc5b1 Remove AbstractDB and move those methods into LimboDB 2025-02-09 18:40:42 +09:00
김선우
d1789d1d6e Implement executeUpdate 2025-02-09 17:49:16 +09:00
김선우
ed9cf63c51 Implement abort 2025-02-09 17:37:19 +09:00
김선우
968ae74810 Implement isValid 2025-02-09 17:28:32 +09:00
김선우
4e067b2997 Throw exceptions on unsupported methods 2025-02-09 17:24:52 +09:00