 
 ;;; ## page
 
-(s/defn ^:always-validate page
+(s/defn ^:ql ^:always-validate page
   "Specify which 'page' of results to fetch (offset and limit the results).
 
      (page {} {:page 1, :items 20}) ; fetch first 20 rows"

      (str/replace #"_" "-")
      keyword))

(def ^:private ^:const dispatchable-tokens
  "Keywords that have a corresponding function in this namespace that we can 'dispatch' to."
  #{;; top-level
    :aggregation :breakout :filter :fields :order-by :source-table :limit :page
    ;; aggregation subclauses
    :count :avg :distinct :stddev :sum :cum-sum
    ;; filter subclauses
    :and :or :inside :between := :!= :< :> :<= :>= :starts-with :contains :ends-with :time-interval
    ;; fields
    :fk-> :datetime-field
    ;; order-by subclauses
    :asc :desc
    ;; values
    :relative-datetime})

(defn- apply-fn-for-token
  "Apply the appropriate function for dispatchable token.


;;; ## source-table

(s/defn ^:ql ^:always-validate source-table
  "Specify the ID of the table to query (required).

     (source-table {} 100)"
