   (:require
    [plumbing.core :refer :all]
    [manifold.deferred :as d]
+   [manifold.stream :as s]
    [qbits.hayt :as h]
    [er-cassandra.key :refer [make-sequential extract-key-equality-clause]]
    [er-cassandra.session :as session])

    table
    key
    record-or-key-value
    {:keys [row-generator] :as opts}]
   (session/execute
    session
    (select-statement table key record-or-key-value

    table
    key
    record-or-key-value
    {:keys [buffer-size] :as opts}]
   (let [strm (session/execute-buffered
               session
               (select-statement
                table key record-or-key-value
                (dissoc opts :columns :where :only-if :order-by :limit))
               (-> opts
                   (dissoc :buffer-size)))]
     (if buffer-size
       (s/buffer buffer-size strm)
       strm))))

(defn select-one
  "select a single record"
