db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4572) Documentation needed for user-defined types
Date Fri, 16 Apr 2010 14:36:26 GMT

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

Rick Hillegas commented on DERBY-4572:

Thanks for the UDT documentation, Kim. It looks great. I have a couple comments:


I can see that UDTs don't fit the current definition of either primitive or wrapper matches.
To keep this simple (and not add another column to the table), I would recommend re-wording
the definition of "wrapper match" as follows:

"For builtin datatypes, Derby looks for a wrapper class in the java.lang or java.sql packages
corresponding to the SQL type. For instance, SQL INTEGER matches java.lang.Integer. For a
user-defined type (UDT), Derby looks for the UDT's external name class."

Then in the table, put "-" in the Primitive Match column for the User-defined type row.


o I would reword the first sentence after the syntax block:

"If the Java class does not implement java.io.Serializable, or if it is not public and visible
on the classpath, then Derby raises an exception when preparing statements which refer to
the user-defined type."

o I would also recommend making the final paragraph more specific:

"You can use JDBC setObject() and getObject() methods to store and retrieve values of user-defined
types. For example:"

And in the example, "getObject()" should be "rs.getObject()".


o I have misgivings about the following sentence. It might be fixed by just adding user-defined
types to the list of schema objects. However, that list is getting unwieldy. Maybe the list
could be collapsed to just "a schema object".

"The syntax that you use for the GRANT statement depends on whether you are granting privileges
to a table, a routine, or a sequence generator, or granting a role."

o I recommend putting TYPE in all caps like the other keywords on this page:

"GRANT USAGE ON TYPE [ schemaName. ] typeName TO grantees"

o I think that the page needs an example of GRANT USAGE ON TYPE at the end.


o I wonder if the syntax for revoking USAGE privilege on a sequence generator should be modified
so that the sequence name looks like the type name in the follow-on syntax description. That
would eliminate the need for the separate definition of sequenceName later on. Something like

REVOKE USAGE ON SEQUENCE [ schemaName. ] sequenceName FROM grantees RESTRICT

o I think that the page needs an example of REVOKE USAGE ON TYPE at the end.

> Documentation needed for user-defined types
> -------------------------------------------
>                 Key: DERBY-4572
>                 URL: https://issues.apache.org/jira/browse/DERBY-4572
>             Project: Derby
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Kim Haase
>            Assignee: Kim Haase
>         Attachments: DERBY-4572.diff, DERBY-4572.stat, DERBY-4572.zip
> DERBY-651 provides support for user-defined types, which now need to be documented.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message