           {:select [:e :a :v :tx [1 :added]] ;; TODO: generalize columns.
            :from   [:all_datoms]
            :where  (cons :and (map #(vector := %1 %2) [:e :a :v] (take-while (comp not nil?) [e a v])))} ;; Must drop nils.
-          (sql/format)
+          (sql-format)
 
           (s/all-rows (:sqlite-connection db))
           (<?)

       (uncaughtException [_ thread ex]
         (println ex "Uncaught exception on" (.getName thread))))))

(defprotocol IClock
  (now
    [clock]

          {:select [:e :a :v :tx [1 :added]] ;; TODO: generalize columns.
           :from   [:all_datoms]
           :where  [:and [:= :a a] [:= :v v] [:= :index_avet 1]]}
          (sql-format)

          (s/all-rows (:sqlite-connection db))
          (<?)
