Given a query and a set of bindings, build a partial tuple needed
to extract the relation from the database.
(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)))))
Comments top
No comments for build-partial-tuple. Log in to add a comment.