You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prepared queries ignore a literal :as-of, :valid-at or :any-valid-time #603
When the value is a literal (:as-of 1, :as-of "2024-01-01T00:00:00Z", :valid-at "...", :any-valid-time), the if let does not match and the value is dropped. Every PreparedQuery::execute and PreparedQuery::query then runs as if the query had no time travel: current transaction time, valid now.
db.execute("(transact [[:a :n 1]])")?;
db.execute("(transact [[:a :n 2]])")?;let p = db.prepare("(query [:find ?v :as-of 1 :where [:a :n ?v]])")?;
p.execute(&[])?;// 2 rows (both values); db.execute of the same query: 1 row
A prepared per-fact pseudo-attribute query with :any-valid-time fails with INT-026 for the same reason. Slot forms (:as-of $tx, :valid-at $t) work.
Since
0ef578e (2026-04-04, "use take/mem::replace instead of clone in substitution helpers"). On main (v2.x) and v3.
Fix
Only replace the field when it is a slot (if let Some(AsOf::Slot(name)) = &query.as_of), with regression tests for each literal form through execute and query. Fix on v3, backport to main.
Activity
fix(prepared): keep a literal :as-of / :valid-at when binding slots (#…
fix(prepared): keep a literal :as-of / :valid-at when binding slots (#…
Merge pull request #604 from project-minigraf/fix/603-prepared-temporal
adityamukho commentedon Oct 15, 2026
Fixed on
v3by #604 and onmainby #605 (28f4a4e). Stays open until the next v2.x patch is released (data-integrity process, CONTRIBUTING.md).release: v2.0.7
adityamukho commentedon Oct 16, 2026
Fixed in v2.0.7 (released 2026-10-16; https://crates.io/crates/minigraf/2.0.7). Also fixed on v3.