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)
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) |
getBigDecimal, getBigDecimal, getBoolean, getByte, getBytes, getDate, getDouble, getFloat, getInt, getLong, getObject, getShort, getString, getTime, getTimestamp
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDouble, getFetchDirection, getFetchSize, getFloat, getLong, getObject, getObject, getObject, getRef, getRef, getRow, getStatement, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, notImplemented, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getRowId, getRowId, getSQLXML, getSQLXML, isClosed, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateObject, updateObject, updateObject, updateObject, updateRowId, updateRowId, updateSQLXML, updateSQLXML
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 VTITemplateBase
public boolean next() throws java.sql.SQLException
next
in interface java.sql.ResultSet
next
in class VTITemplate
java.sql.SQLException
public java.lang.String getString(int column) throws java.sql.SQLException
getString
in interface java.sql.ResultSet
getString
in class VTITemplateBase
java.sql.SQLException
public int getInt(int column) throws java.sql.SQLException
getInt
in interface java.sql.ResultSet
getInt
in class VTITemplateBase
java.sql.SQLException
public short getShort(int column) throws java.sql.SQLException
getShort
in interface java.sql.ResultSet
getShort
in class VTITemplateBase
java.sql.SQLException
public void close()
close
in interface java.lang.AutoCloseable
close
in interface java.sql.ResultSet
close
in class VTITemplate
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.