build-partial-tuple

clojure.contrib.datalog.magic

  • (build-partial-tuple q bindings)
Given a query and a set of bindings, build a partial tuple needed
to extract the relation from the database.

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/magic.clj:78 top

(defn build-partial-tuple
  "Given a query and a set of bindings, build a partial tuple needed
   to extract the relation from the database."
  [q bindings]
  (into {} (remove nil? (map (fn [[k v :as pair]]
                               (if (is-var? v)
                                 nil
                                 (if (is-query-var? v)
                                   [k (bindings v)]
                                   pair)))
                             (:term-bindings q)))))
Vars in clojure.contrib.datalog.magic/build-partial-tuple: defn fn into map nil? remove
Used in 0 other vars

Comments top

No comments for build-partial-tuple. Log in to add a comment.