Skip to content

Commit 68c6eff

Browse files
author
Barry Lind
committed
Third phase of restructuring to add jdbc3 support.
Modified Files: jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/jdbc1/DatabaseMetaData.java jdbc/org/postgresql/jdbc1/Jdbc1Connection.java jdbc/org/postgresql/jdbc1/Jdbc1ResultSet.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java jdbc/org/postgresql/jdbc2/Array.java jdbc/org/postgresql/jdbc2/DatabaseMetaData.java jdbc/org/postgresql/jdbc2/Jdbc2Connection.java jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java Added Files: jdbc/org/postgresql/jdbc1/Jdbc1CallableStatement.java jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java Removed Files: jdbc/org/postgresql/jdbc1/CallableStatement.java jdbc/org/postgresql/jdbc2/CallableStatement.java jdbc/org/postgresql/jdbc2/UpdateableResultSet.java
1 parent 73eb2df commit 68c6eff

17 files changed

+1873
-3123
lines changed

src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import org.postgresql.util.*;
1414

1515

16-
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.1 2002/07/23 03:59:55 barry Exp $
16+
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.2 2002/07/25 22:45:27 barry Exp $
1717
* This class defines methods of the jdbc1 specification. This class is
1818
* extended by org.postgresql.jdbc2.AbstractJdbc2Connection which adds the jdbc2
1919
* methods. The real Connection class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Connection
@@ -359,8 +359,7 @@ public org.postgresql.Driver getDriver()
359359
// are common to all implementations (JDBC1 or 2), they are placed here.
360360
// This should make it easy to maintain the two specifications.
361361

362-
//BJL TODO this method shouldn't need to take a Connection since this can be used.
363-
public abstract java.sql.ResultSet getResultSet(java.sql.Statement stat, org.postgresql.Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException;
362+
public abstract java.sql.ResultSet getResultSet(Statement statement, org.postgresql.Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException;
364363

365364
/*
366365
* This adds a warning to the warning chain.

src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
import org.postgresql.util.PGbytea;
1414
import org.postgresql.util.PSQLException;
1515

16-
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.1 2002/07/23 03:59:55 barry Exp $
16+
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.2 2002/07/25 22:45:27 barry Exp $
1717
* This class defines methods of the jdbc1 specification. This class is
1818
* extended by org.postgresql.jdbc2.AbstractJdbc2ResultSet which adds the jdbc2
1919
* methods. The real ResultSet class (for jdbc1) is org.postgresql.jdbc1.Jdbc1ResultSet
2020
*/
2121
public abstract class AbstractJdbc1ResultSet
2222
{
23-
2423
protected Vector rows; // The results
24+
protected Statement statement;
2525
protected Field fields[]; // The field descriptions
2626
protected String status; // Status of the result
2727
protected boolean binaryCursor = false; // is the data binary or Strings
@@ -33,17 +33,18 @@ public abstract class AbstractJdbc1ResultSet
3333
protected SQLWarning warnings = null; // The warning chain
3434
protected boolean wasNullFlag = false; // the flag for wasNull()
3535

36-
// We can chain multiple resultSets together - this points to
36+
// We can chain multiple resultSets together - this points to
3737
// next resultSet in the chain.
3838
protected ResultSet next = null;
3939

4040
protected StringBuffer sbuf = null;
4141
public byte[][] rowBuffer=null;
4242

4343

44-
public AbstractJdbc1ResultSet(org.postgresql.PGConnection conn, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor)
44+
public AbstractJdbc1ResultSet(org.postgresql.PGConnection conn, Statement statement, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor)
4545
{
4646
this.connection = conn;
47+
this.statement = statement;
4748
this.fields = fields;
4849
this.rows = tuples;
4950
this.status = status;
@@ -116,7 +117,7 @@ public byte getByte(int columnIndex) throws SQLException
116117
throw new PSQLException("postgresql.res.badbyte", s);
117118
}
118119
}
119-
return 0; // SQL NULL
120+
return 0; // SQL NULL
120121
}
121122

122123
public short getShort(int columnIndex) throws SQLException
@@ -134,7 +135,7 @@ public short getShort(int columnIndex) throws SQLException
134135
throw new PSQLException("postgresql.res.badshort", s);
135136
}
136137
}
137-
return 0; // SQL NULL
138+
return 0; // SQL NULL
138139
}
139140

140141
public int getInt(int columnIndex) throws SQLException

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy