Re: isLast() and empty ResultSet

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: isLast() and empty ResultSet
Дата
Msg-id Pine.BSO.4.56.0504211700090.24801@leary.csoft.net
обсуждение исходный текст
Ответ на isLast() and empty ResultSet  ("Ruediger Herrmann" <ruediger.herrmann@gmx.de>)
Список pgsql-jdbc

On Thu, 21 Apr 2005, Ruediger Herrmann wrote:

> I implemented an Iterator interface iterating over a ResultSet. Therefore
> I rely on isLast() to implement the Iterator#hasNext() method. This works
> fine unless the whole ResultSet is empty.
> For empty RresultSets, isLast always returns true.

It always returns false because isLast implies that you are on the last
row of the ResultSet.  If the ResultSet is empty you aren't on a row,
so you can't be on the last row.

Kris Jurka

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

Предыдущее
От: Dennis Sacks
Дата:
Сообщение: Re: switching from 7.4.1 to 8.0-311 jdbc driver
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: isLast() and empty ResultSet