I am considering moving the results of with-query-results into defrecords. What is the best way to achieve this?
I wrote the following but it hits the limitation of 20 parameters and I get an exception: (defrecord PerfRecord [perf-dt grp-id sec-id asset-class beg-mv-base end-mv-base beg_mv_locl end_mv_locl net_out_flows_base net_in_flows_base net_inc_flows_base accr_fx_base net_out_flows_locl net_in_flows_locl net_inc_flows_locl beg_accrued_base end_accrued_base beg_accrued_locl shares base_curcy_cd end_accrued_locl sec_typ1 sec_typ2 perf_curcy_cd price_curcy_cd]) (defn to-records [res] (apply #(PerfRecord. %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17 %18 %19 %20 %21) res)) (defn get-data [] (sql/with-connection dbconn (sql/with-query-results res [query-str] (to-records res)))) Is there a better way to write the to-records method? -- Shoeb -- 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