Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit603c46d

Browse files
author
Dave Cramer
committed
changes to accomodate updateable resultset mostly just call setSqlQuery on execute
1 parent7873bed commit603c46d

File tree

1 file changed

+112
-1
lines changed

1 file changed

+112
-1
lines changed

‎src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public java.sql.ResultSet executeQuery(String sql) throws SQLException
7171
publicintexecuteUpdate(Stringsql)throwsSQLException
7272
{
7373
this.execute(sql);
74+
if (((org.postgresql.ResultSet)result).reallyResultSet())
75+
thrownewPSQLException("postgresql.stat.result");
7476
returnthis.getUpdateCount();
7577
}
7678

@@ -124,12 +126,17 @@ public boolean execute(String sql) throws SQLException
124126
rs.close();
125127
}
126128

129+
127130
// New in 7.1, pass Statement so that ExecSQL can customise to it
128131
result =connection.ExecSQL(sql,this);
129132

130133
// New in 7.1, required for ResultSet.getStatement() to work
131134
((org.postgresql.jdbc2.ResultSet)result).setStatement(this);
132135

136+
// Added this so that the Updateable resultset knows the query that gave this
137+
((org.postgresql.jdbc2.ResultSet)result).setSQLQuery(sql);
138+
139+
133140
return (result !=null && ((org.postgresql.ResultSet)result).reallyResultSet());
134141
}
135142

@@ -267,4 +274,108 @@ public void setResultSetType(int value) throws SQLException
267274
{
268275
resultsettype =value;
269276
}
270-
}
277+
278+
// In JDK 1.4 not implemented
279+
/**
280+
*
281+
* @param num
282+
* @return
283+
* @throws SQLException
284+
*/
285+
publicbooleangetMoreResults(intnum)throwsSQLException
286+
{
287+
throworg.postgresql.Driver.notImplemented();
288+
}
289+
290+
/**
291+
*
292+
* @return
293+
* @throws SQLException
294+
*/
295+
publicjava.sql.ResultSetgetGeneratedKeys()throwsSQLException
296+
{
297+
throworg.postgresql.Driver.notImplemented();
298+
}
299+
300+
/**
301+
*
302+
* @param a
303+
* @param b
304+
* @return
305+
* @throws SQLException
306+
*/
307+
publicintexecuteUpdate(Stringa,intb)throwsSQLException
308+
{
309+
throworg.postgresql.Driver.notImplemented();
310+
}
311+
312+
/**
313+
*
314+
* @param a
315+
* @param b
316+
* @return
317+
* @throws SQLException
318+
*/
319+
publicintexecuteUpdate(Stringa,int[]b)throwsSQLException
320+
{
321+
throworg.postgresql.Driver.notImplemented();
322+
323+
}
324+
325+
publicintexecuteUpdate(Stringa,String[]b)throwsSQLException
326+
{
327+
throworg.postgresql.Driver.notImplemented();
328+
329+
}
330+
331+
/**
332+
*
333+
* @param a
334+
* @param b
335+
* @return
336+
* @throws SQLException
337+
*/
338+
publicbooleanexecute(Stringa,intb)throwsSQLException
339+
{
340+
throworg.postgresql.Driver.notImplemented();
341+
342+
}
343+
344+
/**
345+
*
346+
* @param a
347+
* @param b
348+
* @return
349+
* @throws SQLException
350+
*/
351+
publicbooleanexecute(Stringa,int[]b)throwsSQLException
352+
{
353+
throworg.postgresql.Driver.notImplemented();
354+
355+
}
356+
357+
/**
358+
*
359+
* @param a
360+
* @param b
361+
* @return
362+
* @throws SQLException
363+
*/
364+
publicbooleanexecute(Stringa,String[]b)throwsSQLException
365+
{
366+
throworg.postgresql.Driver.notImplemented();
367+
368+
}
369+
370+
/**
371+
*
372+
* @return
373+
* @throws SQLException
374+
*/
375+
publicintgetResultSetHoldability()throwsSQLException
376+
{
377+
throworg.postgresql.Driver.notImplemented();
378+
379+
}
380+
381+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp