Repository navigation
fix(prepared): keep a literal :as-of / :valid-at when binding slots (#603) - #605
Merged
Merged
Conversation
…603) Backport of the v3 fix: substitute() took query.as_of and query.valid_at out before matching a slot, so a literal :as-of, :valid-at or :any-valid-time in a prepared query was dropped. Only a slot is replaced now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport to v2.x of #604 (issue #603, data-integrity: it stays open until the v2.x patch is released).
prepared::substituteusedquery.as_of.take()/query.valid_at.take()before matching a slot, so a literal:as-of(counter or timestamp),:valid-ator:any-valid-timein a prepared query was dropped, andPreparedQuery::executeran at the current transaction time and valid now. The fix replaces the field only when it is a slot. Present since 0ef578e (2026-04-04).Same fix and tests as on
v3, minus the prepared-cursor check (PreparedQuery::queryis v3 only):prepared_literal_as_of_and_valid_at_are_keptcomparesexecuteand a preparedexecutefor each literal form (verified to fail without the fix), plus asubstituteunit test.cargo test: 1253 (1244 passed, 9 ignored). CHANGELOG[Unreleased]Fixed entry; counts in CLAUDE.md, README, TEST_COVERAGE.🤖 Generated with Claude Code
https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR