Commit graph

529 commits

Author SHA1 Message Date
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
47e08d34bf bindings/rust: Fix Rows::next() I/O dispatcher handling
The `next()` function needs to be a loop to make sure we actually return rows.
2025-06-16 14:28:08 +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
Jussi Saurio
72058da9dc Merge 'bindings/javascript: Add pragma() support' from Anton Harniakou
Some checks failed
JavaScript / stable - x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
JavaScript / Test bindings on x86_64-apple-darwin - node@18 (push) Blocked by required conditions
JavaScript / Test bindings on x86_64-apple-darwin - node@20 (push) Blocked by required conditions
JavaScript / Test bindings on Linux-x64-gnu - node@18 (push) Blocked by required conditions
JavaScript / Test bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
JavaScript / Build universal macOS binary (push) Blocked by required conditions
JavaScript / Publish (push) Blocked by required conditions
Python / check-requirements (push) Waiting to run
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-x86_64 (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / build-wasm (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Run long fuzz tests on Btree / run-long-tests (push) Has been cancelled
Run long fuzz tests on Btree / simple-stress-test (push) Has been cancelled
This PR adds column names to the ouput of js pragma function.

Reviewed-by: Diego Reis (@el-yawd)
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1608
2025-06-10 18:24:13 +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
Anton Harniakou
11ad9b8884 napi.rs: Remove codegen for transaction 2025-06-09 10:43:43 +03:00
Anton Harniakou
8afb07803c Fix typo 2025-06-09 10:43:43 +03:00
Anton Harniakou
a3298c3ce8 make clippy happy 2025-06-09 10:43:43 +03:00
Anton Harniakou
defb2e52e8 process errors 2025-06-09 10:43:43 +03:00
Anton Harniakou
2ffeb87c85 Pass options from wrapper 2025-06-09 10:43:43 +03:00
Anton Harniakou
f9f2535246 better-sqlite: test pragma 2025-06-09 10:43:41 +03:00
Anton Harniakou
7c9c1f60d4 Implement pragma 2025-06-09 10:40:04 +03:00
Anton Harniakou
dbc5e7f15a Add simple pragma option 2025-06-09 10:40:04 +03:00
Anton Harniakou
9f45013ec7 limbo: test simple version of pragma table_list() 2025-06-09 10:39:59 +03:00
Anton Harniakou
acf4bdf835 Resolve merge conflicts 2025-06-09 10:33:56 +03:00
Jussi Saurio
94e334a44a Merge 'bindings/javascript: Add source property to Statement' from Anton Harniakou
Let's you get the source string that was used to create the prepared
statement.

Reviewed-by: Diego Reis (@el-yawd)

Closes #1670
2025-06-09 08:24:47 +03:00
Jussi Saurio
bf26b8913f Merge 'bindings/javascript: Refactor presentation mode and enhance test suite' from Diego Reis
Throughout the cleaning I discovered that the current pluck mode is
broken, so I took the lead and also fixed it.
EDIT: Address comments on #1620 by improving our documentation

Closes #1663
2025-06-09 08:22:08 +03:00
Jussi Saurio
0e552e3f23 Merge 'js-bindings/implement .name property' from Anton Harniakou
Returns the string that was used to open the database connection.

Reviewed-by: Diego Reis (@el-yawd)

Closes #1662
2025-06-09 08:21:26 +03:00
Jussi Saurio
cbfb94d054 Merge 'bindings/java: Add support for Linux build' from Diego Reis
Small PR.
It also adds the ~~massive~~ java's folders to gitignore

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

Closes #1646
2025-06-09 08:12:36 +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
Anton Harniakou
5019379217 Use another syntax to implement the feature 2025-06-06 09:33:26 +03:00
Anton Harniakou
6f88505f90 Add tests 2025-06-06 09:32:25 +03:00
Anton Harniakou
c00ebe94c0 Implement Statement.source property for js/bindings 2025-06-06 09:28:20 +03:00
Diego Reis
f2f2432d39 bind/js: Adds contribution guide 2025-06-05 14:42:44 -03:00
Diego Reis
90e75ee70d bind/js: Updates API docs 2025-06-05 14:42:44 -03:00
Diego Reis
a565b6b008 bind/js: Adds README
I'm assuming this will be the README on npmjs.com
2025-06-05 14:42:44 -03:00
Diego Reis
4c47e8c4dd bind/js: Fix incompatible pluck mode 2025-06-05 14:42:44 -03:00
Diego Reis
9f00f84f5b bind/js: Improve test suite to mirror behaviour 2025-06-05 14:42:42 -03:00
Diego Reis
48056e0941 bind/js: Refactor presentation modes to use an enum 2025-06-05 14:42:11 -03:00
Pekka Enberg
c7ec4a6270 Merge 'bindings/javascript: Add database property to Statement' from Anton Harniakou
Implements `.database` property on Statement object.
```js
let stmt = db.prepare("SELECT 1");
stmt.database == db // will return the database object the stmt was create with
```

Reviewed-by: Diego Reis (@el-yawd)

Closes #1671
2025-06-05 18:33:59 +03:00
Pekka Enberg
12876227c3 Limbo 0.0.22-pre.1 2025-06-05 18:26:33 +03:00
Anton Harniakou
90f34643c3 Implement .database property 2025-06-05 10:00:06 +03:00
Anton Harniakou
1adaa927e6 Add tests 2025-06-05 09:59:20 +03:00
Diego Reis
3a17bf7186 bind/java: Throw in case of yet unsupported Linux on arm64 2025-06-04 10:41:19 -03:00
Anton Harniakou
45fe13f226 Implement .name property 2025-06-04 13:00:13 +03:00
Anton Harniakou
ac33dbb63a Add tests 2025-06-04 11:48:16 +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
Diego Reis
0f685c5b9a bind/js: Add support for raw() Statements 2025-05-30 15:44:34 -03:00
Diego Reis
1367b453e9 bind/js: Add proper exec() method 2025-05-29 16:00:07 -03:00
Pekka Enberg
0ae46e815c Limbo 0.0.21 2025-05-28 12:42:03 +03:00
Pekka Enberg
6b93c9acdc Limbo 0.0.21-pre.2 2025-05-28 12:23:13 +03:00
Pekka Enberg
80d7571f3e Limbo 0.0.21-pre.1 2025-05-28 11:17:08 +03:00
Pekka Enberg
8d7f20b7d2 Merge 'Add libsql_wal_get_frame() API' from Pekka Enberg
This pull request implements the `libsql_wal_get_frame()` API. To do
that, we also introduce a `wait_for_completion()` API in I/O dispatcher.

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

Closes #1533
2025-05-27 18:17:32 +03:00