[ 
https://issues.apache.org/jira/browse/DERBY-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13794044#comment-13794044
 ] 

Knut Anders Hatlen commented on DERBY-6376:
-------------------------------------------

I ran some experiments, and also looked at the code in the GetProcedureColumns 
VTI, and it seems to me that the NULLABLE column always has the value 
functionNullable or procedureNullable (and IS_NULLABLE is always "YES"). 
Changing between primitive types and object types did not change it, and 
specifying RETURNS NULL ON NULL INPUT did not have any effect on it. So I think 
the NULLABLE text could be changed to "Always returns 
DatabaseMetaData.functionNullable" for getFunctionColumns() and "Always returns 
DatabaseMetaData.procedureNullable" for getProcedureColumns().

The COLUMN_TYPE column in getFunctionColums() seems to have these values:

- functionColumnIn if it represents a parameter
- functionReturn if it represents a return value
- functionColumnResult if it represents a column in a table function

functionColumnInOut and functionColumnOut are never returned, since Derby 
doesn't support function parameters of those types.

The COLUMN_TYPE column in getProcedureColumns():

- procedureColumnIn if the parameter is (possibly implicitly) declared as an IN 
parameter
- procedureColumnInOut if the parameter is declared as an INOUT parameter
- procedureColumnOut if the parameter is declared as an OUT parameter

procedureColumnReturn is not returned, since Derby doesn't support procedures 
that return values. Also, it's the declaration of the parameter type in the 
CREATE PROCEDURE statement that controls the type, not the signature of the 
Java method as the original text indicated.

> Revise DatabaseMetaData section of Reference Manual
> ---------------------------------------------------
>
>                 Key: DERBY-6376
>                 URL: https://issues.apache.org/jira/browse/DERBY-6376
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 10.10.1.1
>            Reporter: Kim Haase
>            Priority: Minor
>         Attachments: DERBY-6376.diff, DERBY-6376.stat, DERBY-6376.zip
>
>
> In a comment on DERBY-6369, Knut Anders Hatlen suggests that the topic 
> "Parameters to getProcedureColumns" 
> (http://db.apache.org/derby/docs/10.10/ref/rrefpgc1.html) might be removed. 
> The purpose of the topics under "JDBC Reference" is to provide Derby-specific 
> implementation information. In this topic, however, the Derby-specific 
> information seems to apply to other methods as well: the information on 
> catalogs and the information on name patterns.
> It may be that another topic in the same section, 
> "java.sql.DatabaseMetaData.getProcedureColumns method" 
> (http://db.apache.org/derby/docs/10.10/ref/rrefgpc1.html), could also be 
> removed. Derby presumably supports other DatabaseMetaData methods that are 
> not mentioned, such as getFunctionColumns and, more recently, getAttributes 
> (of UDTS) and getUDTs. Why mention this one only?
> The topic "Columns in the ResultSet returned by getProcedureColumns" 
> (http://db.apache.org/derby/docs/10.10/ref/rrefcrsrgpc1.html) does contain 
> Derby-specific information, listing a couple of columns that are not listed 
> in the Java SE documentation on this method (see 
> http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html). So 
> this topic needs to be retained.
> Some information could be added to the top-level "java.sql.DatabaseMetaData 
> interface" topic 
> (http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html) 
> about needing to specify null for catalog columns and perhaps about using the 
> "%" wildcard to obtain a list of all items in a particular namePattern field.
> Let me know if these changes don't make sense.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to