Commit Graph

215 Commits

Author SHA1 Message Date
Pekka Enberg
744f636c33 Merge 'bindings/java: Make TursoDB and TursoDB factory thread-safe' from Mikaël Francoeur
This PR makes `TursoDB` and `TursoDBFactory` thread-safe. I also used
the opportunity to do some minor improvements.

Reviewed-by: Kim Seon Woo (@seonWKim)

Closes #2070
2025-07-20 09:48:53 +03:00
Diego Reis
68ad2cf37f bind/java: Fix Linux x86 build release 2025-07-17 15:18:58 -03:00
Mikaël Francoeur
b18fd83e6f call TursoDB::load from constructor 2025-07-17 10:20:21 -04:00
Mikaël Francoeur
8fe4f2163c call TursoDB::open from constructor 2025-07-17 10:12:04 -04:00
Mikaël Francoeur
434d1c60be only initialize DriverPropertyInfo once 2025-07-13 12:27:54 -04:00
Mikaël Francoeur
c92e9cf866 prevent double initialization in TursoDB 2025-07-13 11:47:38 -04:00
Mikaël Francoeur
e8228794c7 close statements in text and example 2025-07-13 11:47:38 -04:00
Mikaël Francoeur
d91266fdba make TursoDBFactory thread-safe 2025-07-13 11:47:38 -04:00
Mikaël Francoeur
ed736df60c add dotfiles 2025-07-13 11:43:26 -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
Pekka Enberg
68060dabe2 Merge 'bindings/java: Implement required methods to run on JetBrains Datagrip' from Kim Seon Woo
Now, you can upload driver zar to Datagrip and use Turso database.
<img width="852" alt="image" src="https://github.com/user-
attachments/assets/27b071c3-bef7-4c4a-926d-9225de3c5a5b" />
## How to set up
### Build jar file
command: `make libs && make publish_local`
- this will build and put your jar file under `~/.m2/...`
### Register driver
![image](https://github.com/user-
attachments/assets/3420dcf6-ebda-4444-b9c4-99ed23c76917)
### Set up datasource
![image](https://github.com/user-
attachments/assets/6e87e10c-9d58-4956-8d5c-e4fc6830d83d)

Closes #1971
2025-07-08 10:23:14 +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
김선우
4b6b2c9b00 nit 2025-07-06 17:15:41 +09:00
김선우
d771f4aa2b Implement getObject 2025-07-06 17:15:41 +09:00
김선우
06a288bca9 Implement getColumnDisplaySize 2025-07-06 17:15:41 +09:00
김선우
864fde2633 Implement getColumnName 2025-07-06 17:15:41 +09:00
김선우
5d858052c1 Initialize column metadata on statement creation 2025-07-06 17:15:41 +09:00
김선우
1a7a951b8e Implement getUpdateCount and getMoreResults 2025-07-06 17:15:41 +09:00
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