1
package org.postgresql.jdbc2;
3
// IMPORTANT NOTE: This is the begining of supporting updatable ResultSets.
4
// It is not a working solution (yet)!
6
// You will notice here we really do throw org.postgresql.Driver.notImplemented()
7
// This is because here we should be updateable, so any unimplemented methods
10
// Also you'll notice that the String columnName based calls are not present.
11
// They are not required as they are in the super class.
20
import org.postgresql.Field;
21
import org.postgresql.largeobject.*;
22
import org.postgresql.util.*;
26
* @see ResultSetMetaData
27
* @see java.sql.ResultSet
29
public class UpdateableResultSet extends org.postgresql.jdbc2.ResultSet
33
* Create a new ResultSet - Note that we create ResultSets to
34
* represent the results of everything.
36
* @param fields an array of Field objects (basically, the
38
* @param tuples Vector of the actual data
39
* @param status the status string returned from the back end
40
* @param updateCount the number of rows affected by the operation
41
* @param cursor the positioned update/delete cursor name
43
public UpdateableResultSet(Connection conn, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor)
45
super(conn, fields, tuples, status, updateCount, insertOID, binaryCursor);
49
* Create a new ResultSet - Note that we create ResultSets to
50
* represent the results of everything.
52
* @param fields an array of Field objects (basically, the
54
* @param tuples Vector of the actual data
55
* @param status the status string returned from the back end
56
* @param updateCount the number of rows affected by the operation
57
* @param cursor the positioned update/delete cursor name
59
// public UpdateableResultSet(Connection conn, Field[] fields, Vector tuples, String status, int updateCount)
61
// super(conn,fields,tuples,status,updateCount,0,false);
64
public void cancelRowUpdates() throws SQLException
66
// only sub-classes implement CONCUR_UPDATEABLE
67
throw org.postgresql.Driver.notImplemented();
70
public void deleteRow() throws SQLException
72
// only sub-classes implement CONCUR_UPDATEABLE
73
throw org.postgresql.Driver.notImplemented();
76
public int getConcurrency() throws SQLException
78
// New in 7.1 - The updateable ResultSet class will now return
80
return CONCUR_UPDATABLE;
83
public void insertRow() throws SQLException
85
// only sub-classes implement CONCUR_UPDATEABLE
86
throw org.postgresql.Driver.notImplemented();
89
public void moveToCurrentRow() throws SQLException
91
// only sub-classes implement CONCUR_UPDATEABLE
92
throw org.postgresql.Driver.notImplemented();
95
public void moveToInsertRow() throws SQLException
97
// only sub-classes implement CONCUR_UPDATEABLE
98
throw org.postgresql.Driver.notImplemented();
101
public boolean rowDeleted() throws SQLException
103
// only sub-classes implement CONCUR_UPDATEABLE
104
throw org.postgresql.Driver.notImplemented();
105
//return false; // javac complains about not returning a value!
108
public boolean rowInserted() throws SQLException
110
// only sub-classes implement CONCUR_UPDATEABLE
111
throw org.postgresql.Driver.notImplemented();
112
//return false; // javac complains about not returning a value!
115
public boolean rowUpdated() throws SQLException
117
// only sub-classes implement CONCUR_UPDATEABLE
118
throw org.postgresql.Driver.notImplemented();
119
//return false; // javac complains about not returning a value!
122
public void updateAsciiStream(int columnIndex,
123
java.io.InputStream x,
125
) throws SQLException
127
// only sub-classes implement CONCUR_UPDATEABLE
128
throw org.postgresql.Driver.notImplemented();
131
public void updateBigDecimal(int columnIndex,
132
java.math.BigDecimal x
133
) throws SQLException
135
// only sub-classes implement CONCUR_UPDATEABLE
136
throw org.postgresql.Driver.notImplemented();
139
public void updateBinaryStream(int columnIndex,
140
java.io.InputStream x,
142
) throws SQLException
144
// only sub-classes implement CONCUR_UPDATEABLE
145
throw org.postgresql.Driver.notImplemented();
148
public void updateBoolean(int columnIndex, boolean x) throws SQLException
150
// only sub-classes implement CONCUR_UPDATEABLE
151
throw org.postgresql.Driver.notImplemented();
154
public void updateByte(int columnIndex, byte x) throws SQLException
156
// only sub-classes implement CONCUR_UPDATEABLE
157
throw org.postgresql.Driver.notImplemented();
160
public void updateBytes(int columnIndex, byte[] x) throws SQLException
162
// only sub-classes implement CONCUR_UPDATEABLE
163
throw org.postgresql.Driver.notImplemented();
166
public void updateCharacterStream(int columnIndex,
169
) throws SQLException
171
// only sub-classes implement CONCUR_UPDATEABLE
172
throw org.postgresql.Driver.notImplemented();
175
public void updateDate(int columnIndex, java.sql.Date x) throws SQLException
177
// only sub-classes implement CONCUR_UPDATEABLE
178
throw org.postgresql.Driver.notImplemented();
181
public void updateDouble(int columnIndex, double x) throws SQLException
183
// only sub-classes implement CONCUR_UPDATEABLE
184
throw org.postgresql.Driver.notImplemented();
187
public void updateFloat(int columnIndex, float x) throws SQLException
189
// only sub-classes implement CONCUR_UPDATEABLE
190
throw org.postgresql.Driver.notImplemented();
193
public void updateInt(int columnIndex, int x) throws SQLException
195
// only sub-classes implement CONCUR_UPDATEABLE
196
throw org.postgresql.Driver.notImplemented();
199
public void updateLong(int columnIndex, long x) throws SQLException
201
// only sub-classes implement CONCUR_UPDATEABLE
202
throw org.postgresql.Driver.notImplemented();
205
public void updateNull(int columnIndex) throws SQLException
207
// only sub-classes implement CONCUR_UPDATEABLE
208
throw org.postgresql.Driver.notImplemented();
211
public void updateObject(int columnIndex, Object x) throws SQLException
213
// only sub-classes implement CONCUR_UPDATEABLE
214
throw org.postgresql.Driver.notImplemented();
217
public void updateObject(int columnIndex, Object x, int scale) throws SQLException
219
// only sub-classes implement CONCUR_UPDATEABLE
220
throw org.postgresql.Driver.notImplemented();
223
public void updateRow() throws SQLException
225
// only sub-classes implement CONCUR_UPDATEABLE
226
throw org.postgresql.Driver.notImplemented();
229
public void updateShort(int columnIndex, short x) throws SQLException
231
// only sub-classes implement CONCUR_UPDATEABLE
232
throw org.postgresql.Driver.notImplemented();
235
public void updateString(int columnIndex, String x) throws SQLException
237
// only sub-classes implement CONCUR_UPDATEABLE
238
throw org.postgresql.Driver.notImplemented();
241
public void updateTime(int columnIndex, Time x) throws SQLException
243
// only sub-classes implement CONCUR_UPDATEABLE
244
throw org.postgresql.Driver.notImplemented();
247
public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
249
// only sub-classes implement CONCUR_UPDATEABLE
250
throw org.postgresql.Driver.notImplemented();