Commit Graph

668 Commits

Author SHA1 Message Date
Pekka Enberg
b7db07cf2d Turso 0.1.2 2025-07-15 11:01:25 +03:00
Pekka Enberg
03d170ca05 Turso 0.1.2-pre.4 2025-07-14 13:21:41 +03:00
Pere Diaz Bou
93235bc566 io/wasm: return number read bytes 2025-07-14 10:35:55 +02:00
Pekka Enberg
c454feeba4 Turso 0.1.2-pre.3 2025-07-13 12:55:02 +03:00
Jussi Saurio
a48b6d049a Another post-rebase clippy round with 1.88.0 2025-07-12 19:10:56 +03:00
Nils Koch
1a91966c7e fix clippy errors for rust 1.88.0 (manual fix) 2025-07-12 18:58:55 +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
474c1bff3b Turso 0.1.2-pre.2 2025-07-10 10:10:52 +03:00
Pekka Enberg
91fff1d2b3 Merge 'bindings/python: Start transaction implicitly in execute()' from Pekka Enberg
We need to start transaction implicitly in execute() for DML statements
to make sure first transaction is actually started.
Fixes #2002

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

Closes #2013
2025-07-09 14:34:02 +03:00
Pekka Enberg
6b4dda8b9b Merge 'bindings/javascript: Improve error handling compatibility with better-sqlite3' from Mikaël Francoeur
This PR brings the error handling of the js bindings one step closer to
better-sqlite3. There is still some work left for the error handling to
be 100% compatible.
This is my first non-trivial Rust PR, so if you have any comments that
can help me improve, please leave them on the PR.
-----
as part of https://github.com/tursodatabase/turso/issues/1900

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

Closes #2009
2025-07-09 12:16:28 +03:00
Pekka Enberg
5216e67d53 bindings/python: Start transaction implicitly in execute()
We need to start transaction implicitly in execute() for DML statements
to make sure first transaction is actually started.

Fixes #2002
2025-07-09 10:59:52 +03:00
Pekka Enberg
943793a571 Turso 0.1.2-pre.1 2025-07-09 09:27:31 +03:00
Pekka Enberg
cf47097f45 Turso v0.1.2-pre.1 2025-07-09 09:27:25 +03:00
Mikaël Francoeur
2a691f5044 make some errors compatible with better-sqlite3 2025-07-08 11:36:23 -04:00
Pekka Enberg
b895381ae6 Revert "Merge 'Reachable assertions in Antithesis Python Test for better logging' from Pedro Muniz"
This reverts commit dbbc3f5190, reversing
changes made to 1cd5a49705. We're missing
some mandatory parameters, causing these to fail under Antithesis.
2025-07-08 17:51:12 +03:00
Pere Diaz Bou
91107d364a only close connection in case of reference count is 1
Due to how `execute` is implemented, it returns a `Connection` clone
which internally shares a turso_core::Connection with every other
Connection. Since `execute` returns `Connection` and immediatly it is
dropped, it will close connection, checkpoint and leave database in
weird state.
2025-07-08 15:19:20 +02: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
e9361c0eba add more logging to antithesis tests
format python tests
2025-07-07 19:11:55 -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
Pekka Enberg
7f91768ff6 core/translate: Unify no such table error messages
We're now mixing different error messages, which makes compatibility
testing pretty hard. Unify on a single, SQLite compatible error message
"no such table".
2025-07-07 11:10:46 +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
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