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
The problem @isaksky (🙏 ) raised on slack involves duplication in the tracked :added / :deleted vectors.
I think :added & :deleted might want to be sets as duplicates during flow are permitted, unless there is some otherway to distinct the adds during tracking.
(let [num-schema [[:from:nums]
[:constrain
[:check [number? :n]]
[:unique:id]]]
watched-query (into num-schema
[[:where [= :id1]
;; Try removing this form, the second entry in the result vector does not appear without it
[< 1 [rel/env :now]]]
[:extend
[:hm [- :n [rel/env :now]]]]])
db (-> (rel/transact {}
(for [i (range11e2)]
[:insert:nums {:id i, :n i}]))
(rel/with-env {:now (inst-ms (java.time.Instant/now))})
(rel/mat num-schema)
(rel/watch watched-query))]
(->> (get-in
(rel/track-transact
db
(rel/set-env-tx {:now (+ (inst-ms (java.time.Instant/now)) 5)}))
[:changes watched-query :added])))
;; =>
[{:id1, :n1, :hm-1701901820800} {:id1, :n1, :hm-1701901820800}]
The text was updated successfully, but these errors were encountered:
The problem @isaksky (🙏 ) raised on slack involves duplication in the tracked
:added
/:deleted
vectors.I think
:added
&:deleted
might want to be sets as duplicates during flow are permitted, unless there is some otherway to distinct the adds during tracking.The text was updated successfully, but these errors were encountered: