                        (.countAll query-builder))
        :what-fcall   (fn fcall-query [query-builder [name args]]
                        (.fcall query-builder name (to-array args)))
-       :what-columns (fn [query-builder columns]
+       :what-columns (fn what-columns-query [query-builder columns]
                        (reduce (fn [builder column]
                                  (if (string? column)
                                    (.column builder column)
                                    (column builder)))
                                query-builder
                                columns))
-       :what-column  (fn column-query [query-builder [column {:keys [as]}]]
+       :what-column  (fn what-column-query [query-builder [column {:keys [as]}]]
                        (let [c (.column query-builder (name column))]
                          (if as
                            (.as c as)

       construct))))

;;
;; SELECT Statement
;;


;; Columns

(defn write-time
  [column]
  (fn writetime-query [query-builder]
    (.writeTime query-builder (name column))))

(defn ttl-column
  [column]
  (fn ttl-query [query-builder]
    (.ttl query-builder (name column))))

(defn distinct*
  [column]
  (fn distinct-query [query-builder]
    (.distinct (.column query-builder column))))

(defn as
  [wrapper alias]
  (fn distinct-query [query-builder]
    (.as (wrapper query-builder) alias)))

;; Query Parts

(defn count-all
  []
  [:what-count nil])

(defn fcall
  [name & args]
  [:what-fcall [name args]])

(defn all
  []
  ;; TODO: resolve API inconsistency
  [:what-all nil])

(defn columns
  [& columns]
  [:what-columns columns])

(defn column
  [column & keys]
  [:what-column [column keys]])

(defn where
  [m]
  [:where m])

(defn order-by
  [& orderings]
  [:order orderings])

(defn limit
  [lim]
  [:limit lim])

(defn allow-filtering
  []
  [:filtering nil])

(defn from
  [table-name]
  [:from (name table-name)])

;; Query

(defn- complete-select-query
  [statements]

         )))

;;
;; INSERT Query
;;

(def ^:private with-values
  {:timestamp #(QueryBuilder/timestamp %)
   :ttl       #(QueryBuilder/ttl %)})

(let [order       {:values        1
                   :value         1
                   :values-vector 1
