Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cdbd27c

Browse files
author
Peter Mount
committed
Some more updates...
Fri Feb 17 15:11:00 GMT 2001 peter@retep.org.uk - Reduced the object overhead in PreparedStatement by reusing the same StringBuffer object throughout. Similarly SimpleDateStamp's are alse reused in a thread save manner. - Implemented in PreparedStatement: setNull(), setDate/Time/Timestamp using Calendar, setBlob(), setCharacterStream() - Clob's are now implemented in ResultSet & PreparedStatement! - Implemented a lot of DatabaseMetaData & ResultSetMetaData methods. We have about 18 unimplemented methods left in JDBC2 at the current time.
1 parent 016f0ee commit cdbd27c

File tree

7 files changed

+350
-126
lines changed

7 files changed

+350
-126
lines changed

src/interfaces/jdbc/CHANGELOG

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Fri Feb 17 15:11:00 GMT 2001 peter@retep.org.uk
2+
- Reduced the object overhead in PreparedStatement by reusing the same
3+
StringBuffer object throughout. Similarly SimpleDateStamp's are alse
4+
reused in a thread save manner.
5+
- Implemented in PreparedStatement: setNull(), setDate/Time/Timestamp
6+
using Calendar, setBlob(), setCharacterStream()
7+
- Clob's are now implemented in ResultSet & PreparedStatement!
8+
- Implemented a lot of DatabaseMetaData & ResultSetMetaData methods.
9+
We have about 18 unimplemented methods left in JDBC2 at the current
10+
time.
11+
112
Web Feb 14 17:29:00 GMT 2001 peter@retep.org.uk
213
- Fixed bug in LargeObject & BlobOutputStream where the stream's output
314
was not flushed when either the stream or the blob were closed.

src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java

+48-24
Original file line numberDiff line numberDiff line change
@@ -2539,30 +2539,30 @@ public java.sql.ResultSet getIndexInfo(String catalog, String schema, String tab
25392539

25402540
// ** JDBC 2 Extensions **
25412541

2542+
/**
2543+
* New in 7.1 - we don't support deletes so this must be false!
2544+
*/
25422545
public boolean deletesAreDetected(int i) throws SQLException
25432546
{
2544-
throw org.postgresql.Driver.notImplemented();
2547+
return false;
25452548
}
25462549

2550+
/**
2551+
* New in 7.1 - we don't support deletes so this must be false!
2552+
*/
25472553
public boolean othersDeletesAreVisible(int i) throws SQLException
25482554
{
2549-
throw org.postgresql.Driver.notImplemented();
2550-
}
2551-
2552-
public Class getClass(String catalog,
2553-
String schema,
2554-
String table,
2555-
String columnNamePattern
2556-
) throws SQLException
2557-
{
2558-
throw org.postgresql.Driver.notImplemented();
2555+
return false;
25592556
}
25602557

25612558
public java.sql.Connection getConnection() throws SQLException
25622559
{
25632560
return (java.sql.Connection)connection;
25642561
}
25652562

2563+
/**
2564+
* Return user defined types in a schema
2565+
*/
25662566
public java.sql.ResultSet getUDTs(String catalog,
25672567
String schemaPattern,
25682568
String typeNamePattern,
@@ -2572,66 +2572,90 @@ public java.sql.ResultSet getUDTs(String catalog,
25722572
throw org.postgresql.Driver.notImplemented();
25732573
}
25742574

2575+
/**
2576+
* New in 7.1 - we don't support visible inserts so this must be false!
2577+
*/
25752578
public boolean othersInsertsAreVisible(int type) throws SQLException
25762579
{
2577-
throw org.postgresql.Driver.notImplemented();
2580+
return false;
25782581
}
25792582

2583+
/**
2584+
* New in 7.1 - we don't support visible updates so this must be false!
2585+
*/
25802586
public boolean updatesAreDetected(int type) throws SQLException
25812587
{
2582-
throw org.postgresql.Driver.notImplemented();
2588+
return false;
25832589
}
25842590

2591+
/**
2592+
* New in 7.1 - we don't support visible updates so this must be false!
2593+
*/
25852594
public boolean othersUpdatesAreVisible(int type) throws SQLException
25862595
{
2587-
throw org.postgresql.Driver.notImplemented();
2596+
return false;
25882597
}
25892598

25902599
public boolean ownUpdatesAreVisible(int type) throws SQLException
25912600
{
2592-
throw org.postgresql.Driver.notImplemented();
2601+
return false;
25932602
}
25942603

25952604
public boolean ownInsertsAreVisible(int type) throws SQLException
25962605
{
2597-
throw org.postgresql.Driver.notImplemented();
2606+
return false;
25982607
}
25992608

26002609
public boolean insertsAreDetected(int type) throws SQLException
26012610
{
2602-
throw org.postgresql.Driver.notImplemented();
2611+
return false;
26032612
}
26042613

26052614
public boolean ownDeletesAreVisible(int type) throws SQLException
26062615
{
2607-
throw org.postgresql.Driver.notImplemented();
2616+
return false;
26082617
}
26092618

26102619
public boolean rowChangesAreDetected(int type) throws SQLException
26112620
{
2612-
throw org.postgresql.Driver.notImplemented();
2621+
return false;
26132622
}
26142623

26152624
public boolean rowChangesAreVisible(int type) throws SQLException
26162625
{
2617-
throw org.postgresql.Driver.notImplemented();
2626+
return false;
26182627
}
26192628

2629+
/**
2630+
* New in 7.1 - If this is for PreparedStatement yes, ResultSet no
2631+
*/
26202632
public boolean supportsBatchUpdates() throws SQLException
26212633
{
2622-
throw org.postgresql.Driver.notImplemented();
2634+
return true;
26232635
}
26242636

2637+
/**
2638+
* New in 7.1
2639+
*/
26252640
public boolean supportsResultSetConcurrency(int type,int concurrency) throws SQLException
26262641
{
2627-
throw org.postgresql.Driver.notImplemented();
2642+
// These combinations are not supported!
2643+
if(type==java.sql.ResultSet.TYPE_SCROLL_SENSITIVE)
2644+
return false;
2645+
2646+
// We don't yet support Updateable ResultSets
2647+
if(concurrency==java.sql.ResultSet.CONCUR_UPDATABLE)
2648+
return false;
2649+
2650+
// Everything else we do
2651+
return true;
26282652
}
26292653

26302654
public boolean supportsResultSetType(int type) throws SQLException
26312655
{
2632-
throw org.postgresql.Driver.notImplemented();
2656+
// The only type we don't support
2657+
return type!=java.sql.ResultSet.TYPE_SCROLL_SENSITIVE;
26332658
}
26342659

2635-
26362660
}
26372661

0 commit comments

Comments
 (0)