   [^Cluster cluster]
   (.close cluster))
 
-(defmacro prepare
-  "Prepare a single statement, return prepared statement"
-  [body]
-  `(binding [hayt/*prepared-statement* true
-             hayt/*param-stack*        (atom [])]
-     (do ~body)))
-
 (def ^:dynamic *async* false)
 
 (defmacro async


  Listenable
  (add-listener [_ runnable executor]
    (.addListener fut runnable executor)
    )
  )

(defn execute
  [^Session session query]

  [^PreparedStatement statement values]
  (.bind statement (to-array values)))

(defmacro prepare
  "Prepare a single statement, return prepared statement"
  ([body]
     `(binding [hayt/*prepared-statement* true
                hayt/*param-stack*        (atom [])]
        ~body))
  ([session body]
     `(binding [hayt/*prepared-statement* true
                hayt/*param-stack*        (atom [])]
        (.prepare ~session ~body))))

(defprotocol BuildStatement
  (build-statement [query]))

