mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
(agollapudi@demandsolutions.com). Also applied the RefCursor support patch by Nic Ferrier. This patch allows you too return a get a result set from a function that returns a refcursor. For example: call.registerOutParameter(1, Types.OTHER); call.execute(); ResultSet rs = (ResultSet) call.getObject(1); Modified Files: jdbc/org/postgresql/core/BaseStatement.java jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/jdbc1/Jdbc1CallableStatement.java jdbc/org/postgresql/jdbc1/Jdbc1PreparedStatement.java jdbc/org/postgresql/jdbc1/Jdbc1Statement.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java jdbc/org/postgresql/jdbc2/Jdbc2PreparedStatement.java jdbc/org/postgresql/jdbc2/Jdbc2Statement.java jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java jdbc/org/postgresql/jdbc3/Jdbc3Statement.java Added Files: jdbc/org/postgresql/PGRefCursorResultSet.java jdbc/org/postgresql/jdbc1/Jdbc1RefCursorResultSet.java jdbc/org/postgresql/jdbc2/Jdbc2RefCursorResultSet.java jdbc/org/postgresql/jdbc3/Jdbc3RefCursorResultSet.java jdbc/org/postgresql/test/jdbc2/RefCursorTest.java
30 lines
891 B
Java
30 lines
891 B
Java
package org.postgresql.jdbc2;
|
|
|
|
|
|
import java.sql.*;
|
|
import java.util.Vector;
|
|
import org.postgresql.PGRefCursorResultSet;
|
|
import org.postgresql.core.BaseResultSet;
|
|
import org.postgresql.core.Field;
|
|
|
|
public class Jdbc2PreparedStatement extends org.postgresql.jdbc2.AbstractJdbc2Statement implements java.sql.PreparedStatement
|
|
{
|
|
|
|
public Jdbc2PreparedStatement(Jdbc2Connection connection, String sql) throws SQLException
|
|
{
|
|
super(connection, sql);
|
|
}
|
|
|
|
public BaseResultSet createResultSet (Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException
|
|
{
|
|
return new Jdbc2ResultSet(this, fields, tuples, status, updateCount, insertOID, binaryCursor);
|
|
}
|
|
|
|
|
|
public PGRefCursorResultSet createRefCursorResultSet (String cursorName) throws SQLException
|
|
{
|
|
return new Jdbc2RefCursorResultSet(this, cursorName);
|
|
}
|
|
}
|
|
|