Hey. Yes, thanks for your help, it was a String as a byte array. On Jun 2, 10:20 pm, Sean Corfield <seancorfi...@gmail.com> wrote: > On Fri, Jun 1, 2012 at 5:26 AM, rossputin <rossaj...@gmail.com> wrote: > > I've got a clojure.java.jdbc result coming back as a byte[]. Its from > > a GROUP_CONCAT on an int(10) field. > > > In the mysql client the result is: '1,2,4,6,7,19,24,32,54,152'. > > Looks like a string? (coming back as a byte array) > > > I am unsure how to extract this result properly in clojure… (println > > (seq (somevar))) gives me an unexpected result: (49 44 50 44 52 44 54 > > 44 55 44 49 57 44 50 52 44 51 50 44 53 52 44 49 53 50). > > I guess you'd need to convert the byte array to a String and then > split it at "," and then parse each item to an int. Perhaps something > like: > > (map #(Integer/parseInt %) (.split (String. somevar) ",")) > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View --http://corfield.org/ > World Singles, LLC. --http://worldsingles.com/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880)
-- 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