Commit Graph

641 Commits

Author SHA1 Message Date
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
38c650380c fix nvim messup 2025-07-04 11:19:27 -04:00
Mikaël Francoeur
d8d26463db add new test 2025-07-04 11:18:47 -04:00
Mikaël Francoeur
4b1fdc457d fix typo 2025-07-04 11:17:24 -04:00
Mikaël Francoeur
a427751e3a merge js binding test suites 2025-07-04 10:13:05 -04:00
Pekka Enberg
6e79a11dc7 Merge 'bindings/dart initial implementation' from Andika Tanuwijaya
re-upload

Closes #1911
2025-07-04 10:43:19 +03:00
Pekka Enberg
38c6183adf Merge 'bindings/javascript: Implement Database.open' from Lucas Forato
Reviewed-by: Diego Reis (@el-yawd)

Closes #1834
2025-07-04 10:28:50 +03:00
Pekka Enberg
793fa495e8 Merge 'Import JavaScript bindings test suite from libSQL' from Mikaël Francoeur
This PR imports the `sync` test suite from libSQL, and modifies the
export structure match `better-sqlite3`, so that at least a few tests
from the new test suite are passing.
I also changed the `package.json` to expose `wrapper.js` as an
entrypoint. I think the plain `index.js` was probably never meant to be
exposed directly to clients, because the wrapper does some important
transformation. It's also how libSQL-js is
[structured](https://github.com/tursodatabase/libsql-
js/blob/main/package.json#L20).
## DualTest test runner
The test suite that I imported was previously run twice, with different
environment variables: one run for libSQL-js, one run for better-
sqlite3. This worked well with libSQL, because it's compatible with
better-sqlite3. But Turso isn't there yet, so even though all tests need
to run on better-sqlite3, not all tests are passing on Turso.
To make it possible to run the test suite on both implementation, and to
make it possible to track the progress of Turso, I've added a `DualTest`
test runner that emulates the API of the Ava test runner, but instead of
a single `test()` function, it exposes two methods: `both()`, and
`onlySqlitePasses()`. The first one runs the test on both
implementations, and the second one also runs it on both, but expects
that Turso will fail.
When Turso is completely compatible with better-sqlite3, it will be easy
to remove the dual-test runner, since it has the same API as Ava.
## Future development
### Existing tests
The existing tests were divided in two files: `better-sqlite3.spec.mjs`,
and `dual-test.mjs` that are kept in sync manually. The first one is
mostly a superset of the second one, with additional tests indicating
behaviour that isn't implemented in Turso yet. I want to merge these
test suites to also use the dual-test test runner. This will make it
easier to evolve test suites and to track the progress of Turso.
### `SqliteError`
Modifying the test called `errors` to `both()` will show that Turso is
still missing an `SqliteError` type, to be compatible with better-
sqlite3. I have the required changes in a stash and will open a PR
shortly.
-----
as part of https://github.com/tursodatabase/turso/issues/1900

Closes #1941
2025-07-04 10:26:58 +03:00
Pekka Enberg
f46bd6f40d Merge 'bindings/java: Rename to Turso' from Diego Reis
Closes #1936
2025-07-04 10:06:19 +03:00
Mikaël Francoeur
50d542b719 expose wrapper and use default import 2025-07-03 15:19:03 -04:00
Mikaël Francoeur
6faa81034c add and adapt test suite from libsql 2025-07-03 15:19:03 -04:00
Diego Reis
4b32577f80 bind/java: Rename to Turso 2025-07-03 10:56:05 -03:00
Pekka Enberg
9303244f9d bindings/python: Explicit transaction control support 2025-07-03 16:50:21 +03:00
Pekka Enberg
603e57aff8 bindings/python: Fix ROLLBACK 2025-07-03 16:36:18 +03:00
Pekka Enberg
ca990e8fd1 Revert "Merge 'Rust binding improvements' from Pedro Muniz"
This reverts commit bd60cd214c, reversing
changes made to 74e48a3a8f because it
makes limbo_stress hang.
2025-07-03 12:28:10 +03:00
Andika Tanuwijaya
4687f12509 fix clippy warnings 2025-07-02 23:55:53 +07:00
Pekka Enberg
df257d3048 Merge 'Turso, not Limbo, in pyproject.toml' from Simon Willison
https://pypi.org/project/pyturso/0.1.1/ is still showing the old name:
![CleanShot 2025-07-01 at 07 30 11@2x](https://github.com/user-
attachments/assets/a80441ec-507c-4ff7-a698-3cb88625c2cc)

Closes #1912
2025-07-02 19:33:05 +03:00
Pekka Enberg
9a27583dd7 Merge 'bindings/javascript: Formatting and typos' from Mikaël Francoeur
This is a follow-up PR to
https://github.com/tursodatabase/turso/pull/1907#discussion_r2175959782.
I had my formatter set to `prettier` instead of `tsserver`, which seems
to be what the team is using.
So I:
* removed the `prettier-ignore` comments that I added in the other PR;
* formatted js files using `tsserver`;
* formatted md files using `prettier` (it just makes the tables nicer);
* fixed some typos;
* added some formatting info to `CONTRIBUTING.md`.
-----
as part of https://github.com/tursodatabase/turso/issues/1900

Closes #1914
2025-07-02 19:32:30 +03:00
Pekka Enberg
cbf234da6c Merge 'add a README for the rust bindings' from Glauber Costa
Closes #1931
2025-07-02 18:35:39 +03:00
Glauber Costa
bff5a440dc add a README for the rust bindings 2025-07-02 10:18:23 -05:00
Glauber Costa
cdb1edec4e add a basic readme for the typescript binding 2025-07-02 10:03:53 -05:00
Andika Tanuwijaya
c44268f9fa readme 2025-07-02 20:27:08 +07:00
Andika Tanuwijaya
2eb301f62a enable unit test 2025-07-02 20:20:37 +07:00
Andika Tanuwijaya
470aed41e9 bindings/dart wrap statement 2025-07-02 19:12:08 +07:00
Andika Tanuwijaya
cb5194dc11 bindings/dart: named params 2025-07-02 18:53:12 +07:00
Andika Tanuwijaya
af99558307 bindings/dart: naming 2025-07-02 18:43:20 +07:00
Andika Tanuwijaya
0250806da3 lifetime issue 2025-07-02 00:39:54 +07:00
Andika Tanuwijaya
578c7ae53a example 2025-07-02 00:39:36 +07:00
Andika Tanuwijaya
e37388a6c9 readme 2025-07-02 00:17:18 +07:00
Andika Tanuwijaya
135c81f2db ios support 2025-07-02 00:11:42 +07:00
Andika Tanuwijaya
4686592156 migrate dart binding to flutter plugin project 2025-07-02 00:04:42 +07:00
Mikaël Francoeur
165e7eda5f add formatting instructions for js 2025-07-01 11:11:36 -04:00
Mikaël Francoeur
98830516cd fix typos and format md tables with prettier 2025-07-01 11:11:36 -04:00
Mikaël Francoeur
56a679d329 format js files using tsserver 2025-07-01 11:05:26 -04:00
Simon Willison
a46818fda0 Turso, not Limbo, in pyproject.toml 2025-07-01 07:29:06 -07:00
Andika Tanuwijaya
8b158b24e0 re-upload dart binding 2025-07-01 18:43:18 +07:00
PThorpe92
bbee10ba2c Add mvcc and index config to connection open api 2025-06-30 22:04:56 -04:00
PThorpe92
c2670dbd67 Use connection::from_uri method in Python bindings 2025-06-30 22:03:51 -04:00
PThorpe92
51ef3774ab Use connection::from_uri method in Go bindings 2025-06-30 22:03:51 -04:00
Pekka Enberg
bd60cd214c Merge 'Rust binding improvements' from Pedro Muniz
This PR aims to add some more comments and documentation to the Rust
binding. It also fixes an issue where you could not reuse the statement
after it ran to completion or errored. Now the statement resets in those
cases. Also implemented `Stream` for the Rows struct allowing users to
leverage the built-in iterator like methods for better ergonomics.

Closes #1905
2025-07-01 00:08:18 +03:00
Pekka Enberg
74e48a3a8f Merge 'bind/js: add tests for expand' from Mikaël Francoeur
This PR adds tests for the
[`expand()`](https://github.com/WiseLibs/better-
sqlite3/blob/master/docs/api.md#expandtogglestate---this) method of the
better-sqlite3 API.
It can't be implemented in limbo right now, because the table names
aren't surfaced in the `Statement` object (in core).

Closes #1907
2025-07-01 00:07:13 +03:00
Pekka Enberg
f75034c8e0 Turso 0.1.1 2025-06-30 23:58:04 +03:00
Mikaël Francoeur
5627cee24a minus formatting 2025-06-30 15:48:29 -04:00
Lucas Forato
9376ac3f13 feat: merge with main 2025-06-30 16:25:59 -03:00
Pekka Enberg
fb7714a17a Turso 0.1.1-pre.2 2025-06-30 22:19:35 +03:00
Pekka Enberg
75b8362688 bindings/javascript: Don't do Github release
We do the release ourselves, don't ask napi-rs to do it.

Fixes the following error:

```
RequestError [HttpError]: Resource not accessible by integration - https://docs.github.com/rest/releases/releases#create-a-release
```
2025-06-30 22:15:13 +03:00
Pekka Enberg
c92748fc20 Turso 0.1.1-pre.1 2025-06-30 21:52:00 +03:00
Pekka Enberg
df193cd59d bindings/javascript: Add prepublish step
...hopefully sorts the missing native package problem.
2025-06-30 21:51:38 +03:00