Skip to content

Commit 995f8a2

Browse files
committed
Remove duplicate code tonsky#471
1 parent 61edb9e commit 995f8a2

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

src/datascript/query.cljc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -556,17 +556,6 @@
556556
(prod-rel (assoc production :tuples []) (empty-rel binding)))]
557557
(update context :rels collapse-rels new-rel)))
558558

559-
(defn substitute-constant [context pattern-el]
560-
(when (free-var? pattern-el)
561-
(when-some [rel (rel-with-attr context pattern-el)]
562-
(when-some [tuple (first (:tuples rel))]
563-
(when (nil? (fnext (:tuples rel)))
564-
(let [idx (get (:attrs rel) pattern-el)]
565-
(#?(:cljs da/aget :clj get) tuple idx)))))))
566-
567-
(defn substitute-constants [context pattern]
568-
(mapv #(or (substitute-constant context %) %) pattern))
569-
570559
;;; RULES
571560

572561
(defn rule? [context clause]

0 commit comments

Comments
 (0)