1.2.0 permalink Arrow_down_16x16
  • (merge-relations r1 r2)
Merges two relations

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/datalog/database.clj:267 top

(defn merge-relations
  "Merges two relations"
  [r1 r2]
  (assert (= (:schema r1) (:schema r2)))
  (let [merged-indexes (merge-indexes (:indexes r1)
                                      (:indexes r2))
        merged-data (union (:data r1)
                           (:data r2))]
    (assoc r1 :data merged-data :indexes merged-indexes)))
Vars in clojure.contrib.datalog.database/merge-relations: = assert assoc defn let
Used in 0 other vars

Comments top

No comments for merge-relations. Log in to add a comment.