mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Cleanup and reorganization.
- Added a private api layer (org.postgresql.core.Base*) - Cleaned up public api (org.postgresql.PG*) - Added consistent headers and copywrite info - Removed deprecated Serialize functionality - Cleaned up imports - Moved some files to more appropriate locations Modified Files: jdbc/org/postgresql/Driver.java.in jdbc/org/postgresql/PGConnection.java jdbc/org/postgresql/PGNotification.java jdbc/org/postgresql/PGStatement.java jdbc/org/postgresql/core/Encoding.java jdbc/org/postgresql/core/Notification.java jdbc/org/postgresql/core/QueryExecutor.java jdbc/org/postgresql/core/StartupPacket.java jdbc/org/postgresql/fastpath/Fastpath.java jdbc/org/postgresql/fastpath/FastpathArg.java jdbc/org/postgresql/geometric/PGbox.java jdbc/org/postgresql/geometric/PGcircle.java jdbc/org/postgresql/geometric/PGline.java jdbc/org/postgresql/geometric/PGlseg.java jdbc/org/postgresql/geometric/PGpath.java jdbc/org/postgresql/geometric/PGpoint.java jdbc/org/postgresql/geometric/PGpolygon.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSetMetaData.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/jdbc1/Jdbc1CallableStatement.java jdbc/org/postgresql/jdbc1/Jdbc1Connection.java jdbc/org/postgresql/jdbc1/Jdbc1DatabaseMetaData.java jdbc/org/postgresql/jdbc1/Jdbc1PreparedStatement.java jdbc/org/postgresql/jdbc1/Jdbc1ResultSet.java jdbc/org/postgresql/jdbc1/Jdbc1ResultSetMetaData.java jdbc/org/postgresql/jdbc1/Jdbc1Statement.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Blob.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Clob.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java jdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java jdbc/org/postgresql/jdbc2/Array.java jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java jdbc/org/postgresql/jdbc2/Jdbc2Connection.java jdbc/org/postgresql/jdbc2/Jdbc2PreparedStatement.java jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java jdbc/org/postgresql/jdbc2/Jdbc2ResultSetMetaData.java jdbc/org/postgresql/jdbc2/Jdbc2Statement.java jdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java jdbc/org/postgresql/jdbc3/Jdbc3Connection.java jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java jdbc/org/postgresql/jdbc3/Jdbc3ResultSetMetaData.java jdbc/org/postgresql/jdbc3/Jdbc3Statement.java jdbc/org/postgresql/largeobject/BlobInputStream.java jdbc/org/postgresql/largeobject/BlobOutputStream.java jdbc/org/postgresql/largeobject/LargeObject.java jdbc/org/postgresql/largeobject/LargeObjectManager.java jdbc/org/postgresql/test/jdbc2/Jdbc2TestSuite.java jdbc/org/postgresql/test/jdbc2/optional/BaseDataSourceTest.java jdbc/org/postgresql/util/MD5Digest.java jdbc/org/postgresql/util/MessageTranslator.java jdbc/org/postgresql/util/PGbytea.java jdbc/org/postgresql/util/PGmoney.java jdbc/org/postgresql/util/PGobject.java jdbc/org/postgresql/util/PGtokenizer.java jdbc/org/postgresql/util/PSQLException.java jdbc/org/postgresql/util/UnixCrypt.java Added Files: jdbc/org/postgresql/core/BaseConnection.java jdbc/org/postgresql/core/BaseResultSet.java jdbc/org/postgresql/core/BaseStatement.java jdbc/org/postgresql/core/Field.java jdbc/org/postgresql/core/PGStream.java Removed Files: jdbc/org/postgresql/Field.java jdbc/org/postgresql/PG_Stream.java jdbc/org/postgresql/test/jdbc2/SerializeObject.java jdbc/org/postgresql/test/jdbc2/SerializeTest.java jdbc/org/postgresql/util/Serialize.java
This commit is contained in:
@ -6,7 +6,6 @@ import java.math.*;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.PGConnection;
|
||||
import org.postgresql.largeobject.*;
|
||||
|
||||
|
@ -7,7 +7,6 @@ import java.math.*;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.PGConnection;
|
||||
import org.postgresql.largeobject.*;
|
||||
|
||||
|
@ -6,7 +6,7 @@ import java.net.ConnectException;
|
||||
import java.sql.*;
|
||||
import org.postgresql.util.PSQLException;
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Connection.java,v 1.3 2003/02/04 09:20:10 barry Exp $
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Connection.java,v 1.4 2003/03/07 18:39:44 barry Exp $
|
||||
* This class defines methods of the jdbc2 specification. This class extends
|
||||
* org.postgresql.jdbc1.AbstractJdbc1Connection which provides the jdbc1
|
||||
* methods. The real Connection class (for jdbc2) is org.postgresql.jdbc2.Jdbc2Connection
|
||||
@ -52,51 +52,6 @@ public abstract class AbstractJdbc2Connection extends org.postgresql.jdbc1.Abstr
|
||||
typemap = map;
|
||||
}
|
||||
|
||||
public void cancelQuery() throws SQLException
|
||||
{
|
||||
org.postgresql.PG_Stream cancelStream = null;
|
||||
try
|
||||
{
|
||||
cancelStream = new org.postgresql.PG_Stream(PG_HOST, PG_PORT);
|
||||
}
|
||||
catch (ConnectException cex)
|
||||
{
|
||||
// Added by Peter Mount <peter@retep.org.uk>
|
||||
// ConnectException is thrown when the connection cannot be made.
|
||||
// we trap this an return a more meaningful message for the end user
|
||||
throw new PSQLException ("postgresql.con.refused");
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new PSQLException ("postgresql.con.failed", e);
|
||||
}
|
||||
|
||||
// Now we need to construct and send a cancel packet
|
||||
try
|
||||
{
|
||||
cancelStream.SendInteger(16, 4);
|
||||
cancelStream.SendInteger(80877102, 4);
|
||||
cancelStream.SendInteger(pid, 4);
|
||||
cancelStream.SendInteger(ckey, 4);
|
||||
cancelStream.flush();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new PSQLException("postgresql.con.failed", e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if (cancelStream != null)
|
||||
cancelStream.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{} // Ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This overides the standard internal getObject method so that we can
|
||||
* check the jdbc2 type map first
|
||||
|
@ -5,7 +5,7 @@ import java.sql.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.postgresql.Driver;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.core.Field;
|
||||
import org.postgresql.util.PSQLException;
|
||||
|
||||
public abstract class AbstractJdbc2DatabaseMetaData extends org.postgresql.jdbc1.AbstractJdbc1DatabaseMetaData
|
||||
|
@ -8,14 +8,15 @@ import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import org.postgresql.Driver;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.core.BaseStatement;
|
||||
import org.postgresql.core.Field;
|
||||
import org.postgresql.core.Encoding;
|
||||
import org.postgresql.largeobject.*;
|
||||
import org.postgresql.util.PGbytea;
|
||||
import org.postgresql.util.PSQLException;
|
||||
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.14 2003/02/27 05:56:27 barry Exp $
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.15 2003/03/07 18:39:45 barry Exp $
|
||||
* This class defines methods of the jdbc2 specification. This class extends
|
||||
* org.postgresql.jdbc1.AbstractJdbc1ResultSet which provides the jdbc1
|
||||
* methods. The real Statement class (for jdbc2) is org.postgresql.jdbc2.Jdbc2ResultSet
|
||||
@ -39,7 +40,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
|
||||
private PreparedStatement selectStatement = null;
|
||||
|
||||
|
||||
public AbstractJdbc2ResultSet(Statement statement, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor)
|
||||
public AbstractJdbc2ResultSet(BaseStatement statement, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor)
|
||||
{
|
||||
super (statement, fields, tuples, status, updateCount, insertOID, binaryCursor);
|
||||
}
|
||||
@ -236,7 +237,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
|
||||
|
||||
if (i < 1 || i > fields.length)
|
||||
throw new PSQLException("postgresql.res.colrange");
|
||||
return (java.sql.Array) new org.postgresql.jdbc2.Array( connection, i, fields[i - 1], (java.sql.ResultSet) this );
|
||||
return (java.sql.Array) new org.postgresql.jdbc2.Array( connection, i, fields[i - 1], this );
|
||||
}
|
||||
|
||||
|
||||
@ -414,7 +415,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
|
||||
// This one needs some thought, as not all ResultSets come from a statement
|
||||
public Statement getStatement() throws SQLException
|
||||
{
|
||||
return statement;
|
||||
return (Statement) statement;
|
||||
}
|
||||
|
||||
|
||||
@ -1444,7 +1445,7 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
|
||||
}
|
||||
|
||||
|
||||
public void setStatement(Statement statement)
|
||||
public void setStatement(BaseStatement statement)
|
||||
{
|
||||
this.statement = statement;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ package org.postgresql.jdbc2;
|
||||
import java.lang.*;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import org.postgresql.*;
|
||||
import org.postgresql.core.Field;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
public abstract class AbstractJdbc2ResultSetMetaData extends org.postgresql.jdbc1.AbstractJdbc1ResultSetMetaData
|
||||
|
@ -5,10 +5,11 @@ import java.io.*;
|
||||
import java.math.*;
|
||||
import java.sql.*;
|
||||
import java.util.Vector;
|
||||
import org.postgresql.Driver;
|
||||
import org.postgresql.largeobject.*;
|
||||
import org.postgresql.util.PSQLException;
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Statement.java,v 1.11 2003/02/04 09:20:10 barry Exp $
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Statement.java,v 1.12 2003/03/07 18:39:45 barry Exp $
|
||||
* This class defines methods of the jdbc2 specification. This class extends
|
||||
* org.postgresql.jdbc1.AbstractJdbc1Statement which provides the jdbc1
|
||||
* methods. The real Statement class (for jdbc2) is org.postgresql.jdbc2.Jdbc2Statement
|
||||
@ -23,8 +24,8 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
public AbstractJdbc2Statement (AbstractJdbc2Connection c)
|
||||
{
|
||||
super(c);
|
||||
resultsettype = java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE;
|
||||
concurrency = java.sql.ResultSet.CONCUR_READ_ONLY;
|
||||
resultsettype = ResultSet.TYPE_SCROLL_INSENSITIVE;
|
||||
concurrency = ResultSet.CONCUR_READ_ONLY;
|
||||
}
|
||||
|
||||
public AbstractJdbc2Statement(AbstractJdbc2Connection connection, String sql) throws SQLException
|
||||
@ -48,7 +49,7 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
boolean l_return = super.execute();
|
||||
//Now do the jdbc2 specific stuff
|
||||
//required for ResultSet.getStatement() to work and updateable resultsets
|
||||
((AbstractJdbc2ResultSet)result).setStatement((Statement)this);
|
||||
result.setStatement(this);
|
||||
|
||||
return l_return;
|
||||
}
|
||||
@ -118,12 +119,12 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
|
||||
public void cancel() throws SQLException
|
||||
{
|
||||
((AbstractJdbc2Connection)connection).cancelQuery();
|
||||
connection.cancelQuery();
|
||||
}
|
||||
|
||||
public java.sql.Connection getConnection() throws SQLException
|
||||
public Connection getConnection() throws SQLException
|
||||
{
|
||||
return (java.sql.Connection)connection;
|
||||
return (Connection) connection;
|
||||
}
|
||||
|
||||
public int getFetchDirection() throws SQLException
|
||||
@ -131,11 +132,6 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
throw new PSQLException("postgresql.psqlnotimp");
|
||||
}
|
||||
|
||||
public int getFetchSize() throws SQLException
|
||||
{
|
||||
return super.fetchSize;
|
||||
}
|
||||
|
||||
public int getResultSetConcurrency() throws SQLException
|
||||
{
|
||||
return concurrency;
|
||||
@ -150,7 +146,7 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
{
|
||||
// I don't think this should happen, since it's a hint it should just
|
||||
// fail quietly.
|
||||
// throw org.postgresql.Driver.notImplemented();
|
||||
// throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public void setFetchSize(int rows) throws SQLException
|
||||
@ -187,9 +183,9 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
batch.addElement(l_statement);
|
||||
}
|
||||
|
||||
public java.sql.ResultSetMetaData getMetaData() throws SQLException
|
||||
public ResultSetMetaData getMetaData() throws SQLException
|
||||
{
|
||||
java.sql.ResultSet rs = getResultSet();
|
||||
ResultSet rs = getResultSet();
|
||||
if (rs != null)
|
||||
return rs.getMetaData();
|
||||
|
||||
@ -336,7 +332,7 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
|
||||
public void setRef(int i, Ref x) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public void setDate(int i, java.sql.Date d, java.util.Calendar cal) throws SQLException
|
||||
@ -376,7 +372,7 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
|
||||
public java.sql.Array getArray(int i) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public java.math.BigDecimal getBigDecimal(int parameterIndex) throws SQLException
|
||||
@ -387,43 +383,43 @@ public abstract class AbstractJdbc2Statement extends org.postgresql.jdbc1.Abstra
|
||||
|
||||
public Blob getBlob(int i) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public Clob getClob(int i) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public Object getObject(int i, java.util.Map map) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public Ref getRef(int i) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public java.sql.Date getDate(int i, java.util.Calendar cal) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public Time getTime(int i, java.util.Calendar cal) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
public Timestamp getTimestamp(int i, java.util.Calendar cal) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
// no custom types allowed yet..
|
||||
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
throw Driver.notImplemented();
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,7 +4,10 @@ import java.text.*;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.core.BaseConnection;
|
||||
import org.postgresql.core.BaseResultSet;
|
||||
import org.postgresql.core.BaseStatement;
|
||||
import org.postgresql.core.Field;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/*
|
||||
@ -25,9 +28,9 @@ import org.postgresql.util.*;
|
||||
|
||||
public class Array implements java.sql.Array
|
||||
{
|
||||
private org.postgresql.PGConnection conn = null;
|
||||
private org.postgresql.Field field = null;
|
||||
private ResultSet rs;
|
||||
private BaseConnection conn = null;
|
||||
private Field field = null;
|
||||
private BaseResultSet rs;
|
||||
private int idx = 0;
|
||||
private String rawString = null;
|
||||
|
||||
@ -39,14 +42,14 @@ public class Array implements java.sql.Array
|
||||
* @param field the Field descriptor for the field to load into this Array
|
||||
* @param rs the ResultSet from which to get the data for this Array
|
||||
*/
|
||||
public Array( org.postgresql.PGConnection conn, int idx, Field field, ResultSet rs )
|
||||
public Array(BaseConnection conn, int idx, Field field, BaseResultSet rs )
|
||||
throws SQLException
|
||||
{
|
||||
this.conn = conn;
|
||||
this.field = field;
|
||||
this.rs = rs;
|
||||
this.idx = idx;
|
||||
this.rawString = ((AbstractJdbc2ResultSet)rs).getFixedString(idx);
|
||||
this.rawString = rs.getFixedString(idx);
|
||||
}
|
||||
|
||||
public Object getArray() throws SQLException
|
||||
@ -343,8 +346,8 @@ public class Array implements java.sql.Array
|
||||
default:
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
}
|
||||
java.sql.Statement stat = ((AbstractJdbc2Connection)conn).createStatement();
|
||||
return ((AbstractJdbc2Statement)stat).createResultSet(fields, rows, "OK", 1, 0, false);
|
||||
BaseStatement stat = (BaseStatement) conn.createStatement();
|
||||
return (ResultSet) stat.createResultSet(fields, rows, "OK", 1, 0, false);
|
||||
}
|
||||
|
||||
public String toString()
|
||||
|
@ -2,6 +2,9 @@ package org.postgresql.jdbc2;
|
||||
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.Vector;
|
||||
import org.postgresql.core.BaseResultSet;
|
||||
import org.postgresql.core.Field;
|
||||
|
||||
public class Jdbc2CallableStatement extends org.postgresql.jdbc2.AbstractJdbc2Statement implements java.sql.CallableStatement
|
||||
{
|
||||
@ -11,7 +14,7 @@ public class Jdbc2CallableStatement extends org.postgresql.jdbc2.AbstractJdbc2St
|
||||
super(connection, sql);
|
||||
}
|
||||
|
||||
public java.sql.ResultSet createResultSet (org.postgresql.Field[] fields, java.util.Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException
|
||||
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);
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ package org.postgresql.jdbc2;
|
||||
import java.sql.*;
|
||||
import java.util.Vector;
|
||||
import java.util.Hashtable;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.core.Field;
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/Jdbc2Connection.java,v 1.6 2003/02/04 09:20:10 barry Exp $
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/Jdbc2Connection.java,v 1.7 2003/03/07 18:39:45 barry Exp $
|
||||
* This class implements the java.sql.Connection interface for JDBC2.
|
||||
* However most of the implementation is really done in
|
||||
* org.postgresql.jdbc2.AbstractJdbc2Connection or one of it's parents
|
||||
|
@ -2,6 +2,9 @@ package org.postgresql.jdbc2;
|
||||
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.Vector;
|
||||
import org.postgresql.core.BaseResultSet;
|
||||
import org.postgresql.core.Field;
|
||||
|
||||
public class Jdbc2PreparedStatement extends org.postgresql.jdbc2.AbstractJdbc2Statement implements java.sql.PreparedStatement
|
||||
{
|
||||
@ -11,7 +14,7 @@ public class Jdbc2PreparedStatement extends org.postgresql.jdbc2.AbstractJdbc2St
|
||||
super(connection, sql);
|
||||
}
|
||||
|
||||
public java.sql.ResultSet createResultSet (org.postgresql.Field[] fields, java.util.Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException
|
||||
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);
|
||||
}
|
||||
|
@ -3,9 +3,10 @@ package org.postgresql.jdbc2;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.Vector;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.core.BaseStatement;
|
||||
import org.postgresql.core.Field;
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/Jdbc2ResultSet.java,v 1.7 2003/02/04 09:20:10 barry Exp $
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/Jdbc2ResultSet.java,v 1.8 2003/03/07 18:39:45 barry Exp $
|
||||
* This class implements the java.sql.ResultSet interface for JDBC2.
|
||||
* However most of the implementation is really done in
|
||||
* org.postgresql.jdbc2.AbstractJdbc2ResultSet or one of it's parents
|
||||
@ -13,12 +14,12 @@ import org.postgresql.Field;
|
||||
public class Jdbc2ResultSet extends org.postgresql.jdbc2.AbstractJdbc2ResultSet implements java.sql.ResultSet
|
||||
{
|
||||
|
||||
public Jdbc2ResultSet(Statement statement, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor)
|
||||
public Jdbc2ResultSet(BaseStatement statement, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor)
|
||||
{
|
||||
super(statement, fields, tuples, status, updateCount, insertOID, binaryCursor);
|
||||
}
|
||||
|
||||
public java.sql.ResultSetMetaData getMetaData() throws SQLException
|
||||
public ResultSetMetaData getMetaData() throws SQLException
|
||||
{
|
||||
return new Jdbc2ResultSetMetaData(rows, fields);
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package org.postgresql.jdbc2;
|
||||
|
||||
import java.util.Vector;
|
||||
import org.postgresql.core.Field;
|
||||
|
||||
public class Jdbc2ResultSetMetaData extends AbstractJdbc2ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
{
|
||||
public Jdbc2ResultSetMetaData(java.util.Vector rows, org.postgresql.Field[] fields)
|
||||
public Jdbc2ResultSetMetaData(Vector rows, Field[] fields)
|
||||
{
|
||||
super(rows, fields);
|
||||
}
|
||||
|
@ -2,8 +2,11 @@ package org.postgresql.jdbc2;
|
||||
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.Vector;
|
||||
import org.postgresql.core.BaseResultSet;
|
||||
import org.postgresql.core.Field;
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/Jdbc2Statement.java,v 1.4 2003/02/04 09:20:10 barry Exp $
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/Jdbc2Statement.java,v 1.5 2003/03/07 18:39:45 barry Exp $
|
||||
* This class implements the java.sql.Statement interface for JDBC2.
|
||||
* However most of the implementation is really done in
|
||||
* org.postgresql.jdbc2.AbstractJdbc2Statement or one of it's parents
|
||||
@ -16,7 +19,7 @@ public class Jdbc2Statement extends org.postgresql.jdbc2.AbstractJdbc2Statement
|
||||
super(c);
|
||||
}
|
||||
|
||||
public java.sql.ResultSet createResultSet (org.postgresql.Field[] fields, java.util.Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user