Skip to content

Commit

Permalink
remove namespace from kw params: offset, limit, order-by, filters
Browse files Browse the repository at this point in the history
fixes #49
  • Loading branch information
myguidingstar committed Mar 23, 2018
1 parent 0231316 commit 99c04d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/walkable/sql_query_builder.cljc
Expand Up @@ -474,15 +474,15 @@
:post [#(s/valid? (s/keys :req-un [::offset ::limit ::order-by]) %)]}
(let [{::keys [column-names]} sql-schema]
{:offset
(when-let [offset (get-in env [:ast :params ::offset])]
(when-let [offset (get-in env [:ast :params :offset])]
(when (integer? offset)
offset))
:limit
(when-let [limit (get-in env [:ast :params ::limit])]
(when-let [limit (get-in env [:ast :params :limit])]
(when (integer? limit)
limit))
:order-by
(when-let [order-by (get-in env [:ast :params ::order-by])]
(when-let [order-by (get-in env [:ast :params :order-by])]
(filters/->order-by-string column-names order-by))}))

(defn process-conditions
Expand Down Expand Up @@ -522,7 +522,7 @@
extra-condition (env/extra-condition env)

supplied-condition
(get-in env [:ast :params ::filters])
(get-in env [:ast :params :filters])

supplied-condition
(when (s/valid? ::filters/clauses supplied-condition)
Expand Down

0 comments on commit 99c04d2

Please sign in to comment.