You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by bp...@apache.org on 2013/07/11 04:47:49 UTC
svn commit: r1502089 - in /db/derby/code/trunk/java/engine/org/apache/derby:
iapi/db/ConnectionInfo.java iapi/sql/conn/LanguageConnectionContext.java
impl/sql/conn/GenericLanguageConnectionContext.java
Author: bpendleton
Date: Thu Jul 11 02:47:48 2013
New Revision: 1502089
URL: http://svn.apache.org/r1502089
Log:
DERBY-6284: Improve test coverage of org.apache.derby.iapi.db.ConnectionInfo
This patch was contributed by Ahsan Shamsudeen (ahsan dot competition at gmail dot com)
This patch removes the method lastAutoincrementValue from the ConnectionInfo
class. This method is no longer part of the public Derby API; Derby
applications should be using java.sql.Statement.getGeneratedKeys() instead.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/ConnectionInfo.java
db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/ConnectionInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/ConnectionInfo.java?rev=1502089&r1=1502088&r2=1502089&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/ConnectionInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/ConnectionInfo.java Thu Jul 11 02:47:48 2013
@@ -45,33 +45,6 @@ public abstract class ConnectionInfo
/** no requirement for a constructor */
private ConnectionInfo() {}
- /**
- * Get the last autoincrement value inserted into the column by
- * a statement in this connection.
-
- <BR><B> In JDBC 3.0 an application should use the standard methods provided by
- JDBC 3.0 to obtain generated key values. See java.sql.Statement.getGeneratedKeys().</B>
- *
- * @param schemaName Name of the schema.
- * @param tableName Name of the table.
- * @param columnName Name of the column.
- *
- * @return the last value to be inserted into the named autoincrement
- * column by this connection. Returns null if this connection has never
- * inserted into this column.
- *
- * @exception SQLException if the current connection could not be
- * established properly.
- */
- public static Long lastAutoincrementValue(String schemaName,
- String tableName,
- String columnName)
- throws SQLException
- {
- // a static method can manipulate lcc?
- LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC();
- return lcc.lastAutoincrementValue(schemaName, tableName, columnName);
- }
/**
* <B>INTERNAL USE ONLY</B>
Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java?rev=1502089&r1=1502088&r2=1502089&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java Thu Jul 11 02:47:48 2013
@@ -1009,7 +1009,6 @@ public interface LanguageConnectionConte
*
* @see LanguageConnectionContext#lastAutoincrementValue
* @see org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext#lastAutoincrementValue
- * @see org.apache.derby.iapi.db.ConnectionInfo#lastAutoincrementValue
*/
public void autoincrementFlushCache(UUID tableUUID)
throws StandardException;
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java?rev=1502089&r1=1502088&r2=1502089&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java Thu Jul 11 02:47:48 2013
@@ -3299,7 +3299,6 @@ public class GenericLanguageConnectionCo
}
/**
- * Implements ConnectionInfo.lastAutoincrementValue.
* lastAutoincrementValue searches for the last autoincrement value inserted
* into a column specified by the user. The search for the "last" value
* supports nesting levels caused by triggers (Only triggers cause nesting,
@@ -3314,7 +3313,6 @@ public class GenericLanguageConnectionCo
* see values inserted by t2.
*
* @see LanguageConnectionContext#lastAutoincrementValue
- * @see org.apache.derby.iapi.db.ConnectionInfo#lastAutoincrementValue
*/
public Long lastAutoincrementValue(String schemaName, String tableName,
String columnName)
@@ -3428,7 +3426,6 @@ public class GenericLanguageConnectionCo
* @exception StandardException thrown on error.
* @see LanguageConnectionContext#lastAutoincrementValue
* @see GenericLanguageConnectionContext#lastAutoincrementValue
- * @see org.apache.derby.iapi.db.ConnectionInfo#lastAutoincrementValue
*/
public void autoincrementFlushCache(UUID tableUUID)
throws StandardException