 (ns clojurewerkz.cassaforte.cql-test
   (:refer-clojure :exclude [update])
-  (:require [clojurewerkz.cassaforte.test-helper :as th :refer [*session*]]
+  (:require [clojurewerkz.cassaforte.test-helper :as th :refer [*session* with-table]]
             [clojurewerkz.cassaforte.client      :as client]
             [clojurewerkz.cassaforte.policies    :as cp]
             [clojurewerkz.cassaforte.uuids       :as uuids]

           (set (map :message xs))))))


;; (deftest test-paginate
;;   (create-table s :tv_series
;;                 (column-definitions {:series_title  :varchar
;;                                      :episode_id    :int
;;                                      :episode_title :text
;;                                      :primary-key [:series_title :episode_id]}))
;;   (dotimes [i 20]
;;     (insert s :tv_series {:series_title "Futurama" :episode_id i :episode_title (str "Futurama Title " i)})
;;     (insert s :tv_series {:series_title "Simpsons" :episode_id i :episode_title (str "Simpsons Title " i)}))


;;   (is (= (set (range 0 10))
;;          (->> (select s :tv_series
;;                       (paginate :key :episode_id :per-page 10 :where {:series_title "Futurama"}))
;;               (map :episode_id)
;;               set)))

;;   (is (= (set (range 11 20))
;;          (->> (select s :tv_series
;;                       (paginate :key :episode_id :per-page 10 :last-key 10 :where { :series_title "Futurama"}))
;;               (map :episode_id)
;;               set)))

;;   (drop-table s :tv_series))

;; (deftest test-insert-with-consistency-level
;;   (let [r {:name "Alex" :city "Munich" :age (int 19)}]

                 (columns :post_id)
                 (where {:username "Alex"})
                 (order-by (new-query-api/desc :post_id))))))

(deftest test-timeuuid-now-and-unix-timestamp-of
  (let [dt (-> 2 seconds ago)
