-
Notifications
You must be signed in to change notification settings - Fork 49
generating query filter dynamically #51
Copy link
Copy link
Open
Description
Hi,
I'm trying to generate the filter expression dynamically. It does not seem possible with the current implementation of query. Take following function
(defn filterexpand [params]
(map #(list '= (key %) (val %)) params))
Using it like this is not possible:
(defn search-orders [params]
(let [o (ds/query :kind Order (filterexpand params))]
(map-xml-list o)))
I also tried with a macro version of filterexpand:
(defmacro filterexpand [body]
(let [p (eval body)]
(map #(list '= (key %) (val%)) p)))
Can such usage of query be made possible?
Razvan
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels