Commit graph

196 commits

Author SHA1 Message Date
Pekka Enberg
169af0a23e Remove .editorconfig file 2025-07-06 10:44:49 +03:00
Pekka Enberg
5dfbe8db08 Merge 'bindings/java: Merge JavaScript test suites' from Mikaël Francoeur
I modified the `better-sqlite3.spec.mjs` test suite to use the dual test
runner from https://github.com/tursodatabase/turso/pull/1941 and I
deleted the `limbo.spec.mjs` test suite, because it's now redundant.
I looked carefully at the diff between the two test suites to make sure
that we didn't lose any coverage with this change.

Closes #1959
2025-07-06 10:44:35 +03:00
Pekka Enberg
a833f9e33a Merge 'Add multi select test in JDBC4StatementTest' from Kim Seon Woo
In reponse to [discord discussion](https://discord.com/channels/12586588
26257961020/1385754749634084885/1390535068401012858), I thought it would
be better to add a test to show how JDBC4Statement can be used.

Closes #1962
2025-07-06 10:15:15 +03:00
김선우
c8bb2e73ec Add multi select test in JDBC4StatementTest 2025-07-05 09:36:27 +09:00
Mikaël Francoeur
a427751e3a merge js binding test suites 2025-07-04 10:13:05 -04:00
Diego Reis
4b32577f80 bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
Pekka Enberg
9c1b7897ac Fix URLs to point to github.com/tursodatabase/turso 2025-06-30 11:23:53 +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
Pere Diaz Bou
b86491c54f more integer pk in java tests 2025-06-17 19:33:23 +02:00
Pere Diaz Bou
26eb63b09f use integer pk in java tests 2025-06-17 19:33:23 +02:00
Pekka Enberg
db4945eada Merge 'Fix update queries to set n_changes ' from Kim Seon Woo
- `Update` query doesn't update `n_changes`. Let's make it work
- Add `InsertFlags` to add meta information related to insert operations
- For update query, add `UPDATE` flag
- Currently, the update query executes `Insn::Delete` and `Insn::Insert`
internally, it increases `n_change` by 2. So, for the update query,
let's skip increasing `n_change` for the `Insn::Insert`
https://github.com/tursodatabase/limbo/issues/1681

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

Closes #1683
2025-06-16 16:30:20 +03: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
ae2e0bd71c Merge 'bindings/java: Implement JDBC4DatabaseMetadata getTables ' from Kim Seon Woo
## Purpose
Implement `getTables` which is used to extract metadata about the
database
## Changes
- Implement `JDBC4DatabaseMetaData's` `getTables` method
- Extract `JDBC4ResultSet` as field in `JDBC4PreparedStatement`
## Related Issue
https://github.com/tursodatabase/limbo/issues/615

Closes #1687
2025-06-09 10:46:18 +03:00
김선우
ac1fbdc9ce Remove @Disabled from bindings/java test 2025-06-08 13:36:15 +09:00
김선우
853e12f8a1 Nit 2025-06-08 13:29:10 +09:00
김선우
d6a5d8647a Remove JDBC4ResultSetMetadata.java 2025-06-08 13:20:37 +09:00
김선우
166854cce2 Nit 2025-06-08 13:08:41 +09:00
김선우
208c6963e0 Implement getTables for JDBC4DatabaseMetaData 2025-06-08 13:07:19 +09:00
김선우
a00fe6d358 Extract resultSet to field and implement getMetadata() 2025-06-08 12:34:49 +09:00
김선우
71a2885707 Add JDBC4ResultSetMetadata 2025-06-08 12:30:38 +09:00
Diego Reis
3a17bf7186 bind/java: Throw in case of yet unsupported Linux on arm64 2025-06-04 10:41:19 -03:00
Diego Reis
b50dcd493a bind/java: Improve TODO comment 2025-06-03 10:37:46 -03:00
Diego Reis
4589cd6916 bind/java: Add support for building on Linux 2025-06-02 16:18:11 -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
김선우
aeca307c90 Add reason for the @Disabled 2025-05-05 15:04:48 +09:00
김선우
cb1c538a03 Remove @Disalbed annotation for basic UPDATE and DELETE 2025-05-05 14:51:52 +09: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
김선우
6b223421ae Extract LimboPropertiesHolder 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
김선우
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
d0b5aca0b5 build: Don't publish some bindings crates
...attempt to fix "cargo dist" failure.
2025-02-18 19:00:11 +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
김선우
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
Tiago Ribeiro
729524efbd
Update java 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