Re: JDBC 2 ResultSet and cursors - Mailing list pgsql-jdbc

From Jakub Labath
Subject Re: JDBC 2 ResultSet and cursors
Date
Msg-id 20011016112157.A30288@labath.org
Whole thread Raw
In response to JDBC 2 ResultSet and cursors  (Kovács Péter <peter.kovacs@sysdata.siemens.hu>)
List pgsql-jdbc
Hi Peter

> Why the scrollable result sets are not implemented in the current jdbc
> driver? Is it technically impossible or just no one needed this feature yet?

As far as I know the read-only result sets are working in the recent drivers.

for instance
Statement stm = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rs = stm.executeQuery("SELECT * FROM foolist");
rs.afterLast();
System.out.println("Printing it reversed");
while (rs.previous()){
  System.out.println(rs.getString("id")+", "+rs.getString("text"));
}

works just fine with the latest stable driver
the same is true for last()/first() relative() and absolute() methods.

Regards

--
Jakub Labath

pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: Function calls via JDBC
Next
From: Joseph Shraibman
Date:
Subject: Re: J2SE 1.4 and other patches