            [source
             from              ; [[:datoms 'datoms123]]
             external-bindings ; {?var0 (sql/param :foobar)}
-            bindings          ; {?var1 :datoms123.v}
+            bindings          ; {?var1 [:datoms123.v]}
             known-types       ; {?var1 :db.type/integer}
             extracted-types   ; {?var2 :datoms123.value_type_tag}
             wheres            ; [[:= :datoms123.v 15]]

              (assert external)
              (assert internal)
              [:= external internal]))
          vars)))))

(defn expand-where-from-bindings
  "Take the bindings in the CC and contribute

          bindings))

;; This is so we can link clauses to the outside world.
;; Note that we sort the variable list to achieve consistent ordering between
;; Clojure and ClojureScript, yielding sane tests.
(defn- impose-external-bindings [cc]
  (if (empty? (:external-bindings cc))
    cc
