I wrote a small anonymous function to be used with a map
call. The function returns a vector containing a column name and column value from a SQL result set que
You need to use vector function to do this:
#(vector (keyword %) (.getObject resultset %))
P.S. there are also functions for maps, sets, etc.
Your problem is that the simple syntax is trying to evaluate the vector as a function call.
You can insert an "identity" function to make it work, as this is just a simple function that will return the vector unchanged:
#(identity [(keyword %) (.getObject resultset %)])
Yeah, Clojure should really support a #[...] construct, just for this case.
I would recommend the following as the best alternative:
#(vector (keyword %) (.getObject resultset %))