public class GetProcedureColumns extends VTITemplate
Use of VirtualTableInterface to provide support for DatabaseMetaData.getProcedureColumns().
This class is called from a Query constructed in java/org.apache.derby.impl.jdbc/metadata.properties:
The VTI will return columns 3-14, an extra column to the specification METHOD_ID is returned to distinguish between overloaded methods.
- PROCEDURE_CAT String => procedure catalog (may be null)
- PROCEDURE_SCHEM String => procedure schema (may be null)
- PROCEDURE_NAME String => procedure name
- COLUMN_NAME String => column/parameter name
- COLUMN_TYPE Short => kind of column/parameter:
- procedureColumnUnknown - nobody knows
- procedureColumnIn - IN parameter
- procedureColumnInOut - INOUT parameter
- procedureColumnOut - OUT parameter
- procedureColumnReturn - procedure return value
- procedureColumnResult - result column in ResultSet
- DATA_TYPE int => SQL type from java.sql.Types
- TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
- PRECISION int => precision
- LENGTH int => length in bytes of data
- SCALE short => scale
- RADIX short => radix
- NULLABLE short => can it contain NULL?
- procedureNoNulls - does not allow NULL values
- procedureNullable - allows NULL values
- procedureNullableUnknown - nullability unknown
- REMARKS String => comment describing parameter/column
- METHOD_ID Short => Derby extra column (overloading)
- PARAMETER_ID Short => Derby extra column (output order)
VTITemplate.ColumnDescriptor
Modifier and Type | Field and Description |
---|---|
private static ResultColumnDescriptor[] |
columnInfo |
private java.lang.String |
columnName |
private short |
columnType |
private boolean |
isFunction |
private boolean |
isProcedure |
private static java.sql.ResultSetMetaData |
metadata |
private short |
method_count |
private short |
nullable |
private short |
param_number |
private int |
paramCursor |
private RoutineAliasInfo |
procedure |
private int |
returnedTableColumnCount |
private int |
rowCount |
private TypeDescriptor |
sqlType |
private TypeDescriptor |
tableFunctionReturnType |
Constructor and Description |
---|
GetProcedureColumns(AliasInfo aliasInfo,
java.lang.String aliasType) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getInt(int column) |
java.sql.ResultSetMetaData |
getMetaData() |
short |
getShort(int column) |
java.lang.String |
getString(int column) |
boolean |
next() |
private int |
translate(int val) |
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getContext, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getReturnTableSignature, getRow, getRowId, getRowId, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, notImplemented, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setContext, setFetchDirection, setFetchSize, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
private boolean isProcedure
private boolean isFunction
private int rowCount
private int returnedTableColumnCount
private TypeDescriptor tableFunctionReturnType
private RoutineAliasInfo procedure
private int paramCursor
private short method_count
private short param_number
private TypeDescriptor sqlType
private java.lang.String columnName
private short columnType
private final short nullable
private static final ResultColumnDescriptor[] columnInfo
private static final java.sql.ResultSetMetaData metadata
public GetProcedureColumns(AliasInfo aliasInfo, java.lang.String aliasType) throws java.sql.SQLException
java.sql.SQLException
private int translate(int val)
public java.sql.ResultSetMetaData getMetaData()
getMetaData
in interface java.sql.ResultSet
getMetaData
in class VTITemplate
public boolean next() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getString(int column) throws java.sql.SQLException
getString
in interface java.sql.ResultSet
getString
in class VTITemplate
java.sql.SQLException
public int getInt(int column) throws java.sql.SQLException
getInt
in interface java.sql.ResultSet
getInt
in class VTITemplate
java.sql.SQLException
public short getShort(int column) throws java.sql.SQLException
getShort
in interface java.sql.ResultSet
getShort
in class VTITemplate
java.sql.SQLException
public void close()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.