   [{:keys [filter-type field value], :as filter}]
   {:pre [(map? filter) field]}
   (let [field (qp/formatted field)]
-    {field (case          filter-type
+    {field (case filter-type
              ;; TODO: implement Crate equivalent for "BETWEEN"
              :between     ['between [(qp/formatted (:min-val filter)) (qp/formatted (:max-val filter))]]
-             :starts-with ['like (qp/formatted (update value :value (fn [s] (str    s \%)))) ]
+             :starts-with ['like (qp/formatted (update value :value (fn [s] (str s \%))))]
              :contains    ['like (qp/formatted (update value :value (fn [s] (str \% s \%))))]
              :ends-with   ['like (qp/formatted (update value :value (fn [s] (str \% s))))]
-             :>           ['>    (qp/formatted value)]
-             :<           ['<    (qp/formatted value)]
-             :>=          ['>=   (qp/formatted value)]
-             :<=          ['<=   (qp/formatted value)]
-             :=           ['=    (qp/formatted value)]
+             :>           ['> (qp/formatted value)]
+             :<           ['< (qp/formatted value)]
+             :>=          ['>= (qp/formatted value)]
+             :<=          ['<= (qp/formatted value)]
+             :=           ['= (qp/formatted value)]
              :!=          ['not= (qp/formatted value)])}))
 
 (defn- filter-clause->predicate [{:keys [compound-type subclause subclauses], :as clause}]

  [_ korma-form {clause :filter}]
  (k/where korma-form (filter-clause->predicate clause)))

(defn- convert-to-isotime
  "Prints datetime as ISO time"
  [sql-time format]

    :quarter-of-year (extract-integer :quarter expr)
    :year            (extract-integer :year expr)))

(defn- sql-interval [unit amount]
  (format "CURRENT_TIMESTAMP + %d" (* (unit) amount)))

(defn- date-interval [_ unit amount]
  "defines the sql command required for date-interval calculation"
  (case unit
    :quarter  (recur nil :month (kx/* amount 3))
    :year     (k/raw (sql-interval YEAR amount))
    :month    (k/raw (sql-interval MONTH amount))
    :week     (k/raw (sql-interval WEEK amount))
    :day      (k/raw (sql-interval DAY amount))))

(defrecord CrateDriver []
  Named
