nice to have: serializable-fn for Clojure views
Closed this issue · 1 comments
dehubbed commented
It would be nice if views defined in Clojure and executed by the view-server could capture variables just like any other Clojure code. Apparently with serializable-fn you can do that. Downside: No plaintext in design documents.
cemerick commented
Except, Clojure code shipped to the database to be evaluated by the clutch view server aren't "any other Clojure code". Having the default enforce that clean distinction has a ton of benefits.
Note that the code shipped to the database is currently just serialized using pr-str
, so you can provide any code-shaped data structure you want, e.g. using syntax-quote to drop values into view code as desired.