Commit Graph

1032 Commits

Author SHA1 Message Date
kimminseok
76320e82db lint issues with spotless 2025-10-09 11:19:29 +09:00
kimminseok
f9e95697c8 handle empty string in findColumn() method 2025-10-09 10:46:27 +09:00
kimminseok
76b57e5d0c correctly detect empty ResultSet in next() 2025-10-09 10:29:46 +09:00
kimminseok
104c2ffc5e Fix isBeforeFirst to return false for empty ResultSet 2025-10-08 00:40:15 +09:00
kimminseok
043a9fc7b8 Change to verify full exception messages in findColumn tests 2025-10-08 00:25:28 +09:00
kimminseok
64fd282eb0 Fix NullAway warnings in JDBC4ResultSet 2025-10-07 23:50:48 +09:00
kimminseok
253d54c15a Fix spotless lint errors 2025-10-07 23:18:35 +09:00
kimminseok
85f2755837 feat(java): implement getTimestamp() in JDBC4ResultSet 2025-10-07 14:30:03 +09:00
kimminseok
ffd43b4b77 feat(java): implement getTime() in JDBC4ResultSet 2025-10-07 14:25:46 +09:00
kimminseok
6adc272d75 feat(java): implement getDate() in JDBC4ResultSet 2025-10-07 14:22:13 +09:00
kimminseok
fb370c63a6 feat(java): implement getRow() in JDBC4ResultSet 2025-10-07 14:18:34 +09:00
kimminseok
fd61ddbd21 feat(java): implement isBeforeFirst(), isAfterLast() in JDBC4ResultSet 2025-10-07 14:15:10 +09:00
kimminseok
80d11b75b1 feat(java): implement getBigDecimal() in JDBC4ResultSet 2025-10-07 14:10:58 +09:00
kimminseok
2aa76709c2 feat(java): implement getCharacterStream() in JDBC4ResultSet 2025-10-07 14:06:59 +09:00
kimminseok
fcb0323218 feat(java): implement findColumn() in JDBC4ResultSet 2025-10-07 14:02:10 +09:00
Nikita Sivukhin
d2dab3d18c fix main workspace dir 2025-10-06 18:30:29 +04:00
Nikita Sivukhin
926fd25cdd move examples to the top-level directory 2025-10-06 18:01:54 +04:00
pedrocarlo
e93add6c80 remove dyn DatabaseStorage and replace it with DatabaseFile 2025-10-03 14:14:15 -03:00
Nikita Sivukhin
f582744819 fix package jsons 2025-10-03 14:44:15 +04:00
Nikita Sivukhin
82d53f8d06 add sync-wasm-vite example 2025-10-03 14:43:23 +04:00
Nikita Sivukhin
d4373379cd remove wasm example 2025-10-03 14:20:18 +04:00
Nikita Sivukhin
17c99de34f accept libsql:// urls generated by the platform 2025-10-03 14:19:36 +04:00
Nikita Sivukhin
515ccfea76 small adjustment 2025-10-03 14:19:07 +04:00
Nikita Sivukhin
73049a0205 add sync node example 2025-10-03 14:18:52 +04:00
Nikita Sivukhin
b67ef8a7eb add basic examples for database-wasm package 2025-10-03 13:23:59 +04:00
Pekka Enberg
7905841990 Turso 0.2.0 2025-10-03 12:20:42 +03:00
Pekka Enberg
3b1d2535de Turso 0.2.0-pre.15 2025-10-03 11:29:43 +03:00
Nikita Sivukhin
9a82a9509f fix sync-engine bug when auth token is provided as dynamic function 2025-10-03 10:50:54 +04:00
Pekka Enberg
b11246278f Merge 'Enable encryption properly in Rust bindings, whopper, and throughput tests' from Avinash Sajjanshetty
This is a follow up from PR - #3457 which requires users to opt in to
enable encryption. This patch
- Makes appropriate changes to Whopper and Encryption throughput tests
- Updated Rust bindings to pass the encryption options properly
- Added a test for rust bindings
To use encryption in Rust bindings, one needs to do:
```rust
let opts = EncryptionOpts {
    hexkey: "b1bbfda...02a5669fc76327".to_string(),
    cipher: "aegis256".to_string(),
};

let builder = Builder::new_local(&db_file).experimental_encryption(true).with_encryption(opts.clone());
let db = builder.build().await.unwrap();
```
We will remove the `experimental_encryption` once the feature is stable.

Closes #3532
2025-10-02 18:32:06 +03:00
Pekka Enberg
78e3311c3b Merge 'Sync engine defered sync' from Nikita Sivukhin
This PR makes sync client completely autonomous as now it can defer
initial sync.
This can open possibility to asynchronously create DB in the Turso Cloud
while giving user ability to interact with local DB straight away.

Closes #3531
2025-10-02 17:25:11 +03:00
Avinash Sajjanshetty
306f681966 Add an encryption test in rust bindings 2025-10-02 19:50:10 +05:30
Nikita Sivukhin
649fddedf6 remove unnecessary clone 2025-10-02 17:31:30 +04:00
Avinash Sajjanshetty
4ee6bdac1b update Rust bindings to pass encryption options 2025-10-02 18:51:44 +05:30
Avinash Sajjanshetty
593fd5fb88 update Rust bindings to enable experimental encryption 2025-10-02 18:50:57 +05:30
Nikita Sivukhin
cff23c80cb fix wasm client 2025-10-02 16:56:54 +04:00
Nikita Sivukhin
39bf35abe9 adjust native sync client 2025-10-02 16:51:08 +04:00
Nikita Sivukhin
863e3fe94e make url parameter to accept either string or function 2025-10-02 16:17:36 +04:00
Nikita Sivukhin
64389447e3 support defered sync in the bindings core 2025-10-02 16:17:36 +04:00
Pekka Enberg
a44f965a45 Turso 0.2.0-pre.14 2025-10-02 14:29:22 +03:00
Pekka Enberg
17e07e620a Merge 'fix/vdbe: reset op_transaction state properly' from Jussi Saurio
essentially after the first runthrough of `op_transaction` per a given
`ProgramState`, we weren't resetting the instruction state to `Start´ at
all, which means we didn't do any transaction state checking/updating
after that.
PR includes a rust bindings regression test that used to panic before
this change, and I bet it also fixes this issue in turso-go:
https://github.com/tursodatabase/turso-go/issues/28

Closes #3516
2025-10-02 09:25:23 +03:00
Jussi Saurio
f48165eb72 fix/vdbe: reset op_transaction state properly
essentially after the first runthrough of `op_transaction` per a
given `ProgramState`, we weren't resetting the instruction state
to `Start´ at all, which means we didn't do any transaction state
checking/updating.

PR includes a rust bindings regression test that used to panic before
this change, and I bet it also fixes this issue in turso-go:

https://github.com/tursodatabase/turso-go/issues/28
2025-10-02 08:40:41 +03:00
Jussi Saurio
f06aac6192 bindings/rust: don't panic if user provides invalid parameter
Now returns e.g.:

```rust
SqlExecutionFailure(
  "Invalid argument supplied: Unknown parameter ':email' for query 'INSERT INTO users (email, created_at) VALUES (?, ?)'.
  Make sure you're using the correct parameter syntax - named: (:foo), positional: (?, ?)"
)
```

instead of unwrapping a None value and panicing
2025-10-02 07:42:52 +03:00
Pekka Enberg
4666544ea6 Turso 0.2.0-pre.13 2025-10-01 16:40:53 +03:00
Pekka Enberg
4d77786b53 Merge 'Beta' from Pekka Enberg
Reviewed-by: Glauber Costa <glommer@gmail.com>

Closes #3484
2025-10-01 15:23:28 +03:00
Jussi Saurio
8166680ad8 Merge 'make connect() method optional and call it implicitly on first query execution' from Nikita Sivukhin
- mostly needed for Drizzle - because other clients with ESM can just
use await connect(...) wrapper

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

Closes #3462
2025-10-01 15:19:07 +03:00
Nikita Sivukhin
109b3c0609 fix sync package 2025-10-01 11:08:42 +04:00
Pekka Enberg
16540724aa Beta 2025-10-01 07:18:25 +03:00
Nikita Sivukhin
7869ac348e rewrite MaybeLazy and add some test 2025-10-01 02:24:29 +04:00
Nikita Sivukhin
33c46f77ce add js test 2025-09-30 22:46:21 +04:00
Nikita Sivukhin
18e8c037e9 fix tests 2025-09-30 20:45:00 +04:00