Commit Graph

863 Commits

Author SHA1 Message Date
Avinash Sajjanshetty
9e663c7f46 Add IOContext to carry encryption/checksum ctx 2025-08-27 21:33:05 +05:30
PThorpe92
bcdcd47358 Remove Go bindings (moved to their own repo tursodatabase/turso-go) 2025-08-26 19:13:17 -04:00
PThorpe92
4cf111e3c2 Rename Go driver to turso to not conflict with sqlite3, rename limbo->turso 2025-08-26 14:13:42 -04:00
Pekka Enberg
73414663f8 Merge 'bindings/java: Implement batch operations for JDBC4Statement' from Kim Seon Woo
Implement the following methods for JDBC4Statement:
- addBatch
- clearBatch
- executeBatch

Closes #2754
2025-08-24 08:54:44 +03:00
Pekka Enberg
22c9cb6618 s/PerConnEncryptionContext/EncryptionContext/ 2025-08-24 08:17:20 +03:00
Pekka Enberg
1b89273f10 Merge 'refactor encryption module and make it configurable' from Avinash Sajjanshetty
Previously, the encryption module had hardcoded a lot of things. This
refactor makes it slightly nice and makes it configurable.
Right now cipher algorithm is assumed and hardcoded, I will make that
configurable in the upcoming PR

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

Closes #2722
2025-08-24 08:16:28 +03:00
김선우
7057c97cfe Remove .rustc_info.json 2025-08-24 10:25:14 +09:00
김선우
fa8896d9ee Nit 2025-08-24 10:20:39 +09:00
김선우
9f6eb8bc92 Update verification of batch compatible statements using regex 2025-08-24 10:13:04 +09:00
김선우
bf1473dc08 Override JDBC4PreparedStatement to throw exception when calling addBatch method 2025-08-24 09:35:29 +09:00
김선우
346525e5f0 Update test 2025-08-24 09:25:59 +09:00
김선우
df41994ecc Implement execute batch 2025-08-24 09:15:07 +09:00
Pekka Enberg
78295e3b4c Merge 'wal-api: allow to mix frames insert with SQL execution' from Nikita Sivukhin
This PR make it possible to do 2 pretty crazy things with turso-db:
1. Now we can mix WAL frames inserts with SQL execution within same
transaction. This will allow sync engine to execute rebase of local
changes within atomically over main database file (the operation first
require us to push new frames to physically revert local changes and
then we need to replay local logical changes on top of the modified DB
state)
2. Under `conn_raw_api` Cargo feature turso-db now expose method which
allow caller to specify WAL file path. This dangerous capability exposed
for sync-engine which maintain 2 databases: main one and "revert"-DB
which shares same DB file but has it's own separate WAL. As sync-engine
has full control over checkpoint - it can guarantee that DB file will be
consistent with both main and "revert" DB WALs.

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

Closes #2716
2025-08-22 15:41:43 +03:00
Pekka Enberg
2c68613709 bindings/javascript: Fix blob type handling 2025-08-22 14:17:40 +03:00
Avinash Sajjanshetty
3090545167 use encryption ctx instead of encryption key 2025-08-21 22:36:32 +05:30
Nikita Sivukhin
4653f78356 fix compilation 2025-08-21 18:28:16 +04:00
Nikita Sivukhin
abe3404953 fix build 2025-08-21 15:15:23 +04:00
Pekka Enberg
c2208a542a Merge 'Initial pass to support per page encryption' from Avinash Sajjanshetty
This patch adds support for per page encryption. The code is of alpha
quality, was to test my hypothesis. All the encryption code is gated
behind a `encryption` flag. To play with it, you can do:
```sh
cargo run --features encryption -- database.db

turso> PRAGMA key='turso_test_encryption_key_123456';

turso> CREATE TABLE t(v);
```
Right now, most stuff is hard coded. We use AES GCM 256. This
information is not stored anywhere, but in future versions we will start
saving this info in the file. When writing to disk, we will generate a
cryptographically secure random salt, use that to encrypt the page. Then
we will store the authentication tag and the salt in the page itself. To
accommodate this encryption hardcodes reserved space of 28 bytes.
Once the key is set in the connection, we propagate that information to
pager and the WAL, to encrypt / decrypt when reading from disk.

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

Closes #2567
2025-08-20 11:11:24 +03:00
Pekka Enberg
494ce41d80 Turso 0.1.4 2025-08-20 10:35:35 +03:00
Avinash Sajjanshetty
40a209c000 simplify feature flag usage for encryption 2025-08-20 12:49:38 +05:30
Pekka Enberg
d456db31db Turso 0.1.4-pre.11 2025-08-20 09:32:10 +03:00
Avinash Sajjanshetty
fc3b76de1b fix Database storage for WASM bindings 2025-08-20 11:47:25 +05:30
Pekka Enberg
8d7ab52471 Turso 0.1.4-pre.10 2025-08-19 19:32:47 +03:00
Pekka Enberg
6be1f67714 Merge 'JavaScript improvements' from Pekka Enberg
This pull request brings the JavaScript APIs to almost feature parity
with libSQL. Some corner cases like error messages still need some more
work.

Closes #2669
2025-08-19 18:27:51 +03:00
Pekka Enberg
2963ea7239 bindings/rust: Add Connection::last_insert_rowid() method
Fixes #2670
2025-08-19 17:49:24 +03:00
Pekka Enberg
54b4fdaa7d javascript: Implement transactions API 2025-08-19 16:35:44 +03:00
Pekka Enberg
387d384394 javascript: Implement Statement.columns() 2025-08-19 16:35:44 +03:00
Pekka Enberg
5002539b04 javascript: Implement safe integers 2025-08-19 16:35:44 +03:00
Pekka Enberg
6b59bcd51e javascript: Fix Statement.get() for boundary values 2025-08-19 16:35:44 +03:00
Pekka Enberg
692323ae9b bindings/javascript: Rename @tursodatabase/database/sync to compat
We already have a `@tursodatabase/sync` package so let's make the name of the
better-sqlite3 compatibility API package stand out.
2025-08-19 13:20:34 +03:00
Pekka Enberg
976403b080 bindings/javascript: Add TypeScript declarations to package
Fixes #2621
2025-08-19 12:34:49 +03:00
Pekka Enberg
3a72b478d2 Turso 0.1.4-pre.9 2025-08-18 12:55:45 +03:00
Mikaël Francoeur
2ee0132afe rename functions 2025-08-15 17:08:53 -04:00
PThorpe92
cc2fed3297 Remove copy_to API from file IO trait 2025-08-14 21:31:13 -04:00
PThorpe92
3c088dda59 Update callsites of copy_to Database impl 2025-08-14 21:31:13 -04:00
Jussi Saurio
c75e4c1092 Fix non-4096 page sizes by making WAL header lazy 2025-08-14 12:40:58 +03:00
Jussi Saurio
ee58b7bd86 Add fn read_header() to DatabaseStorage trait 2025-08-14 12:40:58 +03:00
Nikita Sivukhin
325e990d6e fix clippy 2025-08-13 16:55:23 +04:00
Nikita Sivukhin
6b97f2584f enable indices in Dart SDK 2025-08-13 16:47:14 +04:00
Nikita Sivukhin
d1eab18670 enable indices in java sdk 2025-08-13 16:46:25 +04:00
Nikita Sivukhin
0f1d954319 enable indices in Rust SDK 2025-08-13 16:28:45 +04:00
Nikita Sivukhin
70581aca5b enable indices in go sdk 2025-08-13 16:24:04 +04:00
Nikita Sivukhin
857f9147f6 enable indices in the python SDK 2025-08-13 16:10:27 +04:00
Nikita Sivukhin
bfa33a27e2 enable indices in database JS sdk 2025-08-13 15:55:40 +04:00
pedrocarlo
b6e200dbed adjust cacheflush calls outside of pager 2025-08-13 10:24:55 +03:00
Pekka Enberg
a6247e891f Turso 0.1.4-pre.8 2025-08-12 19:51:42 +03:00
Pekka Enberg
475799b3e9 Unify JavaScript package README files 2025-08-12 19:30:02 +03:00
Pekka Enberg
269b23ece5 Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-08-12 17:08:30 +03:00
Pekka Enberg
5a65617602 Turso 0.1.4-pre.7 2025-08-12 17:01:47 +03:00
Pekka Enberg
96673a54a8 bindings/javascript: Add async connect() function
Let's make the API symmetric with libSQL and serverless drivers.
2025-08-12 11:39:59 +03:00