Package org.apache.derby.catalog
Class GetProcedureColumns
- java.lang.Object
-
- org.apache.derby.vti.VTITemplate
-
- org.apache.derby.catalog.GetProcedureColumns
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.sql.ResultSet
,java.sql.Wrapper
,AwareVTI
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)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.derby.vti.VTITemplate
VTITemplate.ColumnDescriptor
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description GetProcedureColumns(AliasInfo aliasInfo, java.lang.String aliasType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class org.apache.derby.vti.VTITemplate
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
-
-
-
-
Field Detail
-
isProcedure
private boolean isProcedure
-
isFunction
private boolean isFunction
-
rowCount
private int rowCount
-
returnedTableColumnCount
private int returnedTableColumnCount
-
tableFunctionReturnType
private TypeDescriptor tableFunctionReturnType
-
procedure
private RoutineAliasInfo procedure
-
paramCursor
private int paramCursor
-
method_count
private short method_count
-
param_number
private short param_number
-
sqlType
private TypeDescriptor sqlType
-
columnName
private java.lang.String columnName
-
columnType
private short columnType
-
nullable
private final short nullable
-
columnInfo
private static final ResultColumnDescriptor[] columnInfo
-
metadata
private static final java.sql.ResultSetMetaData metadata
-
-
Constructor Detail
-
GetProcedureColumns
public GetProcedureColumns(AliasInfo aliasInfo, java.lang.String aliasType) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-
Method Detail
-
translate
private int translate(int val)
-
getMetaData
public java.sql.ResultSetMetaData getMetaData()
- Specified by:
getMetaData
in interfacejava.sql.ResultSet
- Overrides:
getMetaData
in classVTITemplate
-
next
public boolean next() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getString
public java.lang.String getString(int column) throws java.sql.SQLException
- Specified by:
getString
in interfacejava.sql.ResultSet
- Overrides:
getString
in classVTITemplate
- Throws:
java.sql.SQLException
-
getInt
public int getInt(int column) throws java.sql.SQLException
- Specified by:
getInt
in interfacejava.sql.ResultSet
- Overrides:
getInt
in classVTITemplate
- Throws:
java.sql.SQLException
-
getShort
public short getShort(int column) throws java.sql.SQLException
- Specified by:
getShort
in interfacejava.sql.ResultSet
- Overrides:
getShort
in classVTITemplate
- Throws:
java.sql.SQLException
-
close
public void close()
-
-