   (:require [ruuvi-server.configuration :as conf]
             [ruuvi-server.util :as util]
             [clojure.string :as string]
-            [ruuvi-server.cache :as cache])
+            [ruuvi-server.cache :as cache]
+            [clojure.java.jdbc :as sql]
+            )
   (:use [korma.db :only (transaction)]
         [korma.core :only (select where insert update values
                                   set-fields with limit order fields)]

        ]

    (if (not (empty? conditions))
      (let [results (select event
                            (where (apply and conditions))
                            (order (order-by 0) (order-by 1))
                            (limit result-limit)) ]

        (map (fn [event]
               (let [event-id (:id event)
                     extra-data (cache/lookup cache-event-extra-data event-id

                                                       event-annotation)]
        [clj-time.core :only (date-time now)]
        [clj-time.coerce :only (to-timestamp)]
        [clojure.string :only (join)]
        [clojure.tools.logging :only (debug info warn error)]
        )
  (:import [org.joda.time DateTime])
