sql

stephenmhopper 2024-06-09T18:46:44.046459Z

I'm trying to rewrite parts of my app to use reducible-query. There's a number of situations where I retrieve rows from the database, map a function over those rows and then create a map of the results. Is there a general way to pass (into {}) to transduce (or reduce would be fine) Something like this (transduce xform into-map-thing (reducible-query ...)). There are some situations where I may want to return a set or a basic sequence using the same query which is why I'm not doing (into {} xform (reducible-query))

p-himik 2024-06-09T19:00:18.617539Z

Use the arity of transduce with init and pass conj as f and {} as init.

stephenmhopper 2024-06-09T19:06:35.212559Z

That's what I was looking for. Thank you!

👍 1