        (uncaughtException [_ thread ex]
          (println ex "Uncaught exception on" (.getName thread))))))
 
+;; Setting this to something else will make your output more readable,
+;; but not automatically safe for use.
+(def sql-quoting-style :ansi)
+
+(defn- sql-format [args]
+  (sql/format args :quoting :ansi))
+
 (defprotocol IClock
   (now
     [clock]

      (->>
        (->>
          {:select [:ident :attr :value] :from [:schema]}
          (sql/format)
          (s/all-rows sqlite-connection))
        (<?)


          {: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)

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