I'm investigating adding query options to my Ring app's GET requests for the more boring CRUD routes.
I'd like to allow the caller to specify a set of SQL-level query customizations such as sorting, paging, counting, distinct ons, limits, some basic constraints etc. across all of my resources, ideally in such a way that I only have to write this once and it will magically "just work" across the board. First of all, there's the hard question of elegantly designing the API itself and how a caller will be able to specify query details. I have some experience with how Parse.com does this with their JSON requests (they pretty much allow you to specify the whole query in there), but I've heard Stack Overflow's and Elastic Search's APIs mentioned as good examples as well. Any other ones you'd recommend? Second, there's the whole business of translating those maps into requests. As far as I can tell, Korma is the right fit here, but I might be also missing out on another good SQL-generation library that I should know of, something I might integrate directly with clojure.jdbc. This doesn't sound like an unsolved problem. Folks, I could use words of wisdom on the subject. Have you done this kind of work on your APIs before? What did you use for reference? Anything clojure-specific I could leverage here to make it as elegant and concise as possible? Cheers! -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.