org.apache.derby.iapi.db
Class ConnectionInfo

java.lang.Object
  extended by org.apache.derby.iapi.db.ConnectionInfo

public abstract class ConnectionInfo
extends java.lang.Object

ConnectionInfo class provides static methods for getting information related to a JDBC connection. When called from within the query language, each method returns information about the connection from which it was called.

Use the methods of this class only within an SQL-J statement; do not call them directly.


Constructor Summary
private ConnectionInfo()
          no requirement for a constructor
 
Method Summary
static java.lang.Long lastAutoincrementValue(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName)
          Get the last autoincrement value inserted into the column by a statement in this connection.
static long nextAutoincrementValue(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName)
          INTERNAL USE ONLY (THIS METHOD MAY BE REMOVED IN A FUTURE RELEASE.)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionInfo

private ConnectionInfo()
no requirement for a constructor

Method Detail

lastAutoincrementValue

public static java.lang.Long lastAutoincrementValue(java.lang.String schemaName,
                                                    java.lang.String tableName,
                                                    java.lang.String columnName)
                                             throws java.sql.SQLException
Get the last autoincrement value inserted into the column by a statement in this connection.
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().

Parameters:
schemaName - Name of the schema.
tableName - Name of the table.
columnName - Name of the column.
Returns:
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.
Throws:
java.sql.SQLException - if the current connection could not be established properly.

nextAutoincrementValue

public static long nextAutoincrementValue(java.lang.String schemaName,
                                          java.lang.String tableName,
                                          java.lang.String columnName)
                                   throws java.sql.SQLException
INTERNAL USE ONLY (THIS METHOD MAY BE REMOVED IN A FUTURE RELEASE.)

Throws:
java.sql.SQLException - on error

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.