Commit Graph

60 Commits

Author SHA1 Message Date
Nikita Sivukhin
d1eab18670 enable indices in java sdk 2025-08-13 16:46:25 +04:00
Jussi Saurio
a48b6d049a Another post-rebase clippy round with 1.88.0 2025-07-12 19:10:56 +03:00
Nils Koch
828d4f5016 fix clippy errors for rust 1.88.0 (auto fix) 2025-07-12 18:58:41 +03:00
pedrocarlo
711b1ef114 make all run_once be run under statement or connection so that rollback is called 2025-07-07 11:51:25 -03:00
Diego Reis
4b32577f80 bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
Pekka Enberg
53ba3ff926 Rename limbo_core crate to turso_core 2025-06-29 09:59:17 +03:00
Pekka Enberg
2fc5c0ce5c Switch to runtime flag for enabling indexes
Makes it easier to test the feature:

```
$ cargo run --  --experimental-indexes
Limbo v0.0.22
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
limbo> CREATE TABLE t(x);
limbo> CREATE INDEX t_idx ON t(x);
limbo> DROP INDEX t_idx;
```
2025-06-26 10:07:28 +03:00
Nils Koch
2827b86917 chore: fix clippy warnings 2025-06-23 19:52:13 +01:00
Pekka Enberg
90c1e3fc06 Switch Connection to use Arc instead of Rc
Connection needs to be Arc so that bindings can wrap it with `Mutex` for
multi-threading.
2025-06-16 10:43:19 +03:00
Pekka Enberg
e3f71259d8 Rename OwnedValue -> Value
We have not had enough merge conflicts for a while so let's do a
tree-wide rename.
2025-05-15 09:59:46 +03:00
Timo Kösters
68d8b86bb7 fix: get name of rowid column 2025-04-22 08:46:37 +02:00
Pere Diaz Bou
ee55116ca6 return row as reference to registers 2025-03-29 22:04:08 +01:00
Pere Diaz Bou
5b7fcd27bd make column reuse blob/text fields 2025-03-29 22:02:49 +01:00
Pere Diaz Bou
bf37fd3314 wip 2025-03-29 22:02:49 +01:00
Pere Diaz Bou
9291f60722 Introduce Register struct
OwnedValue has become a powerhouse of madness, mainly because I decided
to do it like that when I first introduced AggContext. I decided it was
enough and I introduced a `Register` struct that contains `OwnedValue`,
`Record` and `Aggregation`, this way we don't use `OwnedValue` for
everything make everyone's life harder.

This is the next step towards making ImmutableRecords the default
because I want to remove unnecessary allocations. Right now we clone
OwnedValues when we generate a record more than needed.
2025-03-27 17:53:02 +01:00
Pekka Enberg
96175cccf7 cli: Add --experimental-mvcc option to enable MVCC 2025-03-06 10:16:42 +02:00
Pere Diaz Bou
8daf7666d1 Make database Sync + Send 2025-03-05 14:07:48 +01:00
김선우
412bdf5585 Apply cargo formatting 2025-03-03 21:55:10 +09:00
김선우
f8052a9860 Implement totalChanges 2025-03-03 14:35:23 +09: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
김선우
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
wyhaya
351a032cc1 core: Add default column name 2025-02-11 07:03:51 +00: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
김선우
2fa3a1e6ae Apply lint 2025-02-09 22:46:48 +09:00
김선우
e0b0a667bb Implement close 2025-02-09 18:40:50 +09:00
김선우
21d6f33c6b Implement bindXXX functions on rust and java side 2025-02-07 11:25:23 +09:00
김선우
d574e2c277 Add comments on errors.rs 2025-02-07 11:24:43 +09:00
김선우
f6919f028e Add columnNames to LimboResultSet 2025-02-07 09:25:22 +09:00
Pekka Enberg
c210821100 core: Move result row to ProgramState
Move result row to `ProgramState` to mimic what SQLite does where `Vdbe`
struct has a `pResultRow` member. This makes it easier to deal with result
lifetime, but more importantly, eventually lazily parse values at the edges of
the API.
2025-02-06 11:52:26 +02:00
Pekka Enberg
3baca19f75 Merge 'bindings/java: Implement close() for LimboStatement and LimboResultSet ' from Kim Seon Woo
## Purpose of this PR
- Implement `close()` method for `LimboStatement`(+`JDBC4Statement`) and
`LimboResultSet`(+ `JDBC4ResultSet`)
## Changes
- Add `consumeAll` method in `LimboResultSet`
- Implement `close()` methods
  - Because  `JDBC4Statement` has longer lifecycle in compared to
`LimboStatement`, we manage different `close` fields(`LimboStatement` is
created when first `execute` method is called on `JDBC4Statemenet`)
## Reference
- [Issue](https://github.com/tursodatabase/limbo/issues/615)

Closes #799
2025-01-28 14:18:01 +02:00
김선우
eeed305b07 Nit 2025-01-27 20:40:43 +09:00
김선우
c18418bed0 Nit 2025-01-27 20:35:11 +09:00
김선우
4dd2d1c64a Implement close() on LimboStatement 2025-01-27 20:20:10 +09:00
김선우
dae15ef0e3 Implement limbo close() 2025-01-27 19:15:02 +09:00
김선우
f10b41c5b5 Pass io to statement from db 2025-01-24 15:43:44 +09:00
김선우
53586b9d00 Break the loop when step() returns Err 2025-01-24 15:06:10 +09:00
김선우
0481e69217 Handle Err case from connection.io 2025-01-24 14:07:52 +09:00
김선우
36dff168b3 Execute io.run_once when receiving StepResult::IO 2025-01-24 13:52:54 +09:00
김선우
d05ffce613 Apply fmt 2025-01-24 13:52:54 +09:00
김선우
f7a8d1b428 Change Java_org_github_tursodatabase_core_LimboStatement_step to run in loop to handle StepResult::IO 2025-01-24 13:52:54 +09:00
김선우
f80823a297 Add LimboStepResult.java constructor 2025-01-19 21:56:50 +09:00
김선우
9de80e19aa Fix limbo_statement.rs to handle other StepResults 2025-01-19 21:56:49 +09:00
김선우
afbf041e2f Enhance docs 2025-01-19 21:56:40 +09:00
김선우
73f8eab651 Remove the tight coupling(using inheritance) between LimboXXX and JDBCXXX and favor composition instead 2025-01-19 21:56:40 +09:00
김선우
eaa8743c36 Nit 2025-01-18 09:16:09 +09:00
김선우
39245f35cc Add TODOs 2025-01-18 09:09:36 +09:00
김선우
a3a31e787c Initial pass on step function 2025-01-18 09:09:36 +09:00
김선우
5fc5f650cd Extract set_err_msg_and_throw_exception to utils.rs 2025-01-18 09:09:36 +09:00
김선우
f6ec2252cf Group "pointer to struct" and "struct to pointer" functions 2025-01-18 09:09:36 +09:00