Re: IBATIS support for postgres cursors

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: IBATIS support for postgres cursors
Дата
Msg-id 4C74C02F.3070907@burntmail.com
обсуждение исходный текст
Ответ на IBATIS support for postgres cursors  (<Atul.Goel@globaldatapoint.com>)
Ответы Re: IBATIS support for postgres cursors  (<Atul.Goel@globaldatapoint.com>)
Список pgsql-general
On 8/23/2010 12:11 PM, Atul.Goel@globaldatapoint.com wrote:
> Hi,
>
> Can cursors be returned to IBATIS. If so how. This is what I have written.
>
> <parameterMap id=/"/ /getUsersParam"/ class=/"Map"/>
>
> <parameter property=/"results"/ jdbcType=/"REF"/
> javaType=/"java.sql.ResultSet"/ mode=/"OUT"/ resultMap=/"allUsersResult"//>
>
> <parameter property=/"errors"/ jdbcType=/"VARCHAR"/
> javaType=/"java.lang.String"/ mode=/"OUT"//>
>
> </parameterMap>
>
> This does not work. Please help.

There is a dedicated mailing list for MyBatis (renamed from iBATIS) over
at http://www.mybatis.org.  This question would probably be better
addressed there.  I use both PG and MyBatis so I saw your question.  REF
is not an acceptable MyBatis jdbcType.  I'm trying with type OTHER as
documented here:

http://jdbc.postgresql.org/documentation/83/callproc.html#callproc-resultset-setof

But I'm running into an issue which I'll pursue on the MyBatis mailing
list.  Note that with the current refcursor implementation, there is no
advantage over returning SETOF from your function.  Both materialize the
entire result set before returning to the caller.  So, if you can't get
refcursor to work, I'd suggest switching to SETOF.

I'll get back to you when I find out why OTHER is not working.  Or else
you can join the MyBatis mailing list.

--
Guy Rouillier

В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Win32 Backend Cash - pre-existing shared memory block is still in use
Следующее
От: wstrzalka
Дата:
Сообщение: Feature proposal