Repository navigation
Conversation
The stored row equals the copy of the values as read (save() checks that before it writes), so a value that is as read is already stored. The UPDATE carried every property of the record; it now carries the changed ones, as the caller holds them (an ndarray stays an array). A save that changes nothing still runs its UPDATE with every value, so update events fire as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test runs for this PR, read on 2026-11-04:
The five that fail on #194's code are the merge-scope tests: |
|
Closing by the pre-written rule of the timed A/B (GRAY, final): measurements in #245 (comment). |
Closes #245.
Stacked on #194 (
fix/native-save-version, head ea2b429): that PR changed the save path this one edits, so the base is its branch and the diff here is one commit. Retarget tomainwhen #194 merges.save()of a saved record sent every property inUPDATE :rid MERGE :row. The stored row is already compared with the copy of the values as read before the statement runs (#194), so a value that is as read is already stored. The statement now carries the changed values only, as the caller holds them (an ndarray stays an array so the codec's binary path still applies). A save that changes nothing still runs its UPDATE with every value, so update events fire as before.Not changed: the insert reply (the record adopts the stored row, since the engine converts to declared types) and the update read-back, which #194 already skips for values stored as sent. Command rows are already pulled but not encoded until read. A cheaper insert reply would need a native library change (image rebuild) and is not part of this PR.
Tests:
tests/test_native_save_merge.py(native-only, listed intests/conftest.py): one changed property is the only one merged, a save of nothing still runs its UPDATE, an ndarray goes as the array, a tuple equal to what was read is not merged, a new and a changed property merge together and the next save merges only its own change, a stale save is still refused and writes nothing, repeated saves merge one change each. CI only.Draft: the claim (fewer microseconds per save) is measured by a timed A/B against #194's head, pre-registered in the maintainer's study notes before its first run; nothing is claimed here until it is read.
🤖 Generated with Claude Code