 
 (defn where
   [m]
-  [3 (fn where-query [query-builder]
+  [3 (fn where-query [^Select query-builder]
        (build-where m (.where query-builder)))])
+
+(defn asc
+  [^String column-name]
+  (QueryBuilder/asc column-name))
+
+(defn desc
+  [^String column-name]
+  (QueryBuilder/desc column-name))
+
+(defn order-by
+  [& orderings]
+  [3 (fn order-by-query [^Select query-builder]
+       (.orderBy query-builder orderings))])
+
+(defn limit
+  [m]
+  [3 (fn order-by-query [^Select  query-builder]
+       )])
+
+(defn allow-filtering
+  [m]
+  [3 (fn order-by-query [^Select  query-builder]
+       )])
+   ;; public Select orderBy(Ordering... orderings) {
+   ;;  public Select limit(int limit) {
+   ;;  public Select limit(BindMarker marker) {
+   ;;  public Select allowFiltering() {
 
 (defn select
   [table-name & statements]

     (fn [^Select$Where builder [query-type column value]]
       (.and builder ((query-type-map query-type) (name column) value)))
     query-builder
     construct)
    )
  clojure.lang.IPersistentMap
  (build-where [construct ^Select$Where query-builder]
    (reduce

(ns clojurewerkz.cassaforte.new-query-api
  "Functions for building dynamic CQL queries, in case you feel
   that `cql` namespace is too limiting for you."
  (:import [com.datastax.driver.core.querybuilder QueryBuilder
            Select$Selection Select Select$Where

            Clause]
           [com.datastax.driver.core.querybuilder ]))


(def select-command-order
  [QueryBuilder Select$Selection Select Select$Where])

(defn from
  [^String table-name]
  [2 (fn from-query [^Select$Selection query-builder]
       (.from query-builder (name table-name))
       )])

(defn all
  []
  [1 (fn all-query [^Select$Selection query-builder]
       (.all query-builder))])

(defn column
  [column]
  [1 (fn column-query [^Select$Selection query-builder]
       (.column query-builder column))])

(defn columns
  [columns]
  [1 (fn [^Select$Selection query-builder]
       (reduce (fn [^Select$Selection builder column]
                 (.column builder column))
               query-builder
               columns))])
