                                         :display-name "Port"
                                         :type         :integer
                                         :default      4300}])
-          :can-connect?  can-connect})
+          :can-connect?  can-connect
+          :date-interval date-interval})
   sql/ISQLDriver CrateISQLDriverMixin)
 
 (driver/register-driver! :crate (CrateDriver.))

  {:pre [(map? filter) field]}
  (let [field (qp/formatted field)]
    {field (case          filter-type
             :between     ['between [(qp/formatted (:min-val filter)) (qp/formatted (:max-val filter))]]
             :starts-with ['like (qp/formatted (update value :value (fn [s] (str    s \%)))) ]
             :contains    ['like (qp/formatted (update value :value (fn [s] (str \% s \%))))]

            [metabase.driver.generic-sql.query-processor :as qp]
            (korma [core :as k])
            [korma.sql.engine :as kengine]
            [korma.sql.fns :as kfns]
            [metabase.util.korma-extensions :as kx]
            [korma.sql.utils :as kutils]
            [clj-time.format :as f]
            [clj-time.coerce :as c]
            [clj-time.core :as t])
  (:import (clojure.lang Named)
           (java.sql Timestamp)))


(defn- column->base-type
  "Map of Postgres column types -> Field base types.
   Add more mappings here as you come across them."
  [_ column-type]
  ({:integer   :IntegerField
    :string    :TextField
    :boolean   :BooleanField
    :byte      :IntegerField
    :short     :IntegerField
    :long      :BigIntegerField
    :float     :FloatField
    :double    :FloatField
    :ip        :UnknownField
    :timestamp :DateTimeField
    :geo_point :UnknownField
    :geo_shape :UnknownField
    } column-type))

;; # Adapt generic SQL to Crate SQL

