Commit Graph

8400 Commits

Author SHA1 Message Date
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
Glauber Costa
7e76970035 fix: Handle fresh INSERTs in materialized view incremental maintenance
The op_insert function was incorrectly trying to capture an "old record"
for fresh INSERT operations when a table had dependent materialized views.
This caused a "Cannot delete: no current row" error because the cursor
wasn't positioned on any row for new inserts.

The issue was introduced in commit f38333b3 which refactored the state
machine for incremental view handling but didn't properly distinguish
between:
- Fresh INSERT operations (no old record exists)
- UPDATE operations without rowid change (old record should be captured)
- UPDATE operations with rowid change (already handled by DELETE)

This fix checks if cursor.rowid() returns a value before attempting to
capture the old record. If no row exists (fresh INSERT), we correctly
set old_record to None instead of erroring out.

I am also including tests to make sure this doesn't break. The reason I
didn't include tests earlier is that I didn't know it was possible to
run the tests under a flag. But in here, I am just adding the flag to
the execution script.
2025-08-13 06:41:14 -05:00
Nikita Sivukhin
734750daaa fix after rename 2025-08-13 15:26:25 +04:00
Nikita Sivukhin
5838efe7dd rename flag to wal_auto_checkpoint_disabled 2025-08-13 15:26:25 +04:00
Nikita Sivukhin
f9f56f454c change semantic of wal_disable_checkpoint flag - it disable only automatic checkpoint (on shutdown or when WAL is grows too big) 2025-08-13 15:23:18 +04:00
Nikita Sivukhin
0a12b2d74a disable auto-checkpoint for opened connections in the sync engine 2025-08-13 15:23:18 +04:00
Nikita Sivukhin
6e0ad0a483 open draft database only once
- otherwise there will be problems with memory IO backend
2025-08-13 15:23:18 +04:00
Nikita Sivukhin
a78992e309 add assertion with more context 2025-08-13 15:23:18 +04:00
Nikita Sivukhin
c3c7463193 add debug logs to the memory io 2025-08-13 15:23:18 +04:00
Pekka Enberg
57cedcac72 Fix JavaScript getting started 2025-08-13 13:26:40 +03:00
Pekka Enberg
901191d1ee Update README.md 2025-08-13 13:24:00 +03:00
Pekka Enberg
31b826cca7 Merge 'Manual updates' from Pekka Enberg
Reviewed-by: Avinash Sajjanshetty (@avinassh)

Closes #2578
2025-08-13 13:17:50 +03:00
Pekka Enberg
09d64b2290 docs/manual: Drop redundant section place-holder
There's already a section on SQL query language.
2025-08-13 12:55:56 +03:00
Pekka Enberg
c942239a5a docs/manual: Document more of SQLite C API 2025-08-13 12:54:37 +03:00
Pekka Enberg
770b43caa6 docs/manual: Drop indexing from list of limitations
Indexes are enabled by default now.
2025-08-13 12:47:21 +03:00
Pekka Enberg
379896d087 docs/manual: Document some shell commands 2025-08-13 12:46:17 +03:00
Pekka Enberg
bbc7994f59 docs/manual: Document shell command line options 2025-08-13 12:42:48 +03:00
Pekka Enberg
ece8f106d9 docs/manual: Fix JavaScript section
The API changed so fix that up. Also improve flow of text.
2025-08-13 12:26:31 +03:00
Pekka Enberg
9a0d5cebe9 docs/manual: Fix limitations section heading style 2025-08-13 12:26:11 +03:00
Pekka Enberg
db0d80310f Update manual.md 2025-08-13 11:57:47 +03:00
Pekka Enberg
c856472dbe docs: Add a section on MVCC internals 2025-08-13 11:52:02 +03:00
Jussi Saurio
1a625e7bf6 Merge 'Wait for I/O completions' from Pedro Muniz
Depends on #2566.
This PR bubbles all completions up to the `step()` function. Then in the
step function we store the completions and before proceeding with the
next instruction, we first check if IO was completed. Because of this
feature, we do not have to build most our code around waiting for IO to
complete or for the page to be loaded, as we should not proceed to next
state if we did not await all completions.

Closes #2570
2025-08-13 11:23:08 +03:00
TcMits
49a0a3417a finish UPDATE 2025-08-13 15:11:32 +07:00
TcMits
b8ad44bf07 finish INSERT 2025-08-13 14:45:34 +07:00
pedrocarlo
187ffb5698 adjust test 2025-08-13 10:24:55 +03:00
pedrocarlo
8d48be0e61 cleanup 2025-08-13 10:24:55 +03:00
pedrocarlo
fbe7e685ce adjust mvcc code to return completions in state machines 2025-08-13 10:24:55 +03:00
pedrocarlo
c1975cdfa1 ptrmap functions should bubble completions 2025-08-13 10:24:55 +03:00
pedrocarlo
b6e200dbed adjust cacheflush calls outside of pager 2025-08-13 10:24:55 +03:00
pedrocarlo
78cb61c1fe before stepping to next insntruction check for io 2025-08-13 10:24:55 +03:00
pedrocarlo
c381fe3844 bubble completions in Sorter 2025-08-13 10:24:55 +03:00
pedrocarlo
0b6ab9d969 bubble completions in execute 2025-08-13 10:24:55 +03:00
pedrocarlo
925d4b15e1 adjust more pager IO returns 2025-08-13 10:24:55 +03:00
pedrocarlo
56905fc340 refactor checkpoint in pager 2025-08-13 10:24:55 +03:00
pedrocarlo
a7f5912e7d adjust wal checkpoint to return completions 2025-08-13 10:24:55 +03:00
pedrocarlo
10ad43d9e0 sync should return completion 2025-08-13 10:24:55 +03:00
pedrocarlo
a7873d8907 remove write counters from Wal impls 2025-08-13 10:24:55 +03:00
pedrocarlo
494fdb828b buuble completions in pager 2025-08-13 10:24:55 +03:00
pedrocarlo
ccc22863c6 remove return_if_locked and return_if_locked_maybe_load 2025-08-13 10:24:55 +03:00
pedrocarlo
f95625a06c bubble completions in btree 2025-08-13 10:24:55 +03:00
pedrocarlo
82b75330bc adjust types.rs util.rs view.rs and mvcc to bubble io 2025-08-13 10:24:55 +03:00
pedrocarlo
2e68296107 create IOCompletions 2025-08-13 10:24:55 +03:00
Jussi Saurio
43628e2a9a Merge 'IO Cleanups to use and ' from Pedro Muniz
Depends on #2512 .
This is an attempt to remove all the noise from my IO completions
refactor into separate PRs

Closes #2566
2025-08-13 10:24:15 +03:00
TcMits
161c87212e finish all DROP 2025-08-13 14:07:28 +07:00
TcMits
179cce2ceb finish DELETE 2025-08-13 13:56:58 +07:00
Pekka Enberg
2ba28892dc serverless: 0.1.3 2025-08-13 09:56:43 +03:00
Jussi Saurio
e657626167 Merge 'Fix tables renaming to existing index and rename indexed columns on ' from Levy A.
Simple bug fixes.

Closes #2572
2025-08-13 09:56:02 +03:00
Levy A.
6a37916b49 fix: rename indexed columns 2025-08-13 08:55:17 +03:00