My guess from looking at the API documentation for ResultSet is that
it doesn't know which of the several one-parameter overloads of
getObject to choose. Presumably you want the integer one, so try
(.getObject rs (int i)).

-Per

On Fri, Mar 19, 2010 at 12:08 PM, cageface <milese...@gmail.com> wrote:
> I'm trying to eliminate some reflection overhead in little SQL utility
> I'm working on and can't seem to get the type hint right for this
> code:
>
> (import 'java.sql.ResultSet)
>
> (set! *warn-on-reflection* true)
>
> (defn rs-get-row [#^ResultSet rs]
>  (if (.next rs)
>    (let [cols (.. rs getMetaData getColumnCount)]
>      (doall (for [i (range 1 (+ 1 cols))]
>               (.getObject rs i))))
>    nil))
>
> When I run this I get this warning:
> Reflection warning, /tmp/simple.clj:11 - call to getObject can't be
> resolved.
> Reflection warning, /tmp/simple.clj:11 - call to getObject can't be
> resolved.
>
> Is the #^ResultSet hint correct? If so, what else do I need to do to
> resolve this?
>
> --
> 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
>
> To unsubscribe from this group, send email to 
> clojure+unsubscribegooglegroups.com or reply to this email with the words 
> "REMOVE ME" as the subject.
>

-- 
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

To unsubscribe from this group, send email to 
clojure+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to