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 this:
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.