mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Tue Jan 30 22:24:00 GMT 2001 peter@retep.org.uk
- Fixed bug where Statement.setMaxRows() was a global setting. Now limited to just itself. - Changed LargeObject.read(byte[],int,int) to return the actual number of bytes read (used to be void). - LargeObject now supports InputStream's! - PreparedStatement.setBinaryStream() now works! - ResultSet.getBinaryStream() now returns an InputStream that doesn't copy the blob into memory first! - Connection.isClosed() now tests to see if the connection is still alive rather than if it thinks it's alive.
This commit is contained in:
@ -10,7 +10,7 @@ import org.postgresql.largeobject.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
* $Id: Connection.java,v 1.13 2001/01/18 17:37:12 peter Exp $
|
||||
* $Id: Connection.java,v 1.14 2001/01/31 08:26:01 peter Exp $
|
||||
*
|
||||
* This abstract class is used by org.postgresql.Driver to open either the JDBC1 or
|
||||
* JDBC2 versions of the Connection class.
|
||||
@ -22,7 +22,7 @@ public abstract class Connection
|
||||
public PG_Stream pg_stream;
|
||||
|
||||
// This is set by org.postgresql.Statement.setMaxRows()
|
||||
public int maxrows = 0; // maximum no. of rows; 0 = unlimited
|
||||
//public int maxrows = 0; // maximum no. of rows; 0 = unlimited
|
||||
|
||||
private String PG_HOST;
|
||||
private int PG_PORT;
|
||||
@ -414,6 +414,11 @@ public abstract class Connection
|
||||
*/
|
||||
public java.sql.ResultSet ExecSQL(String sql,java.sql.Statement stat) throws SQLException
|
||||
{
|
||||
// added Jan 30 2001 to correct maxrows per statement
|
||||
int maxrows=0;
|
||||
if(stat!=null)
|
||||
maxrows=stat.getMaxRows();
|
||||
|
||||
// added Oct 7 1998 to give us thread safety.
|
||||
synchronized(pg_stream) {
|
||||
// Deallocate all resources in the stream associated
|
||||
|
Reference in New Issue
Block a user