db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r935706 - in /db/derby/docs/trunk/src: devguide/ ref/
Date Mon, 19 Apr 2010 18:58:48 GMT
Author: chaase3
Date: Mon Apr 19 18:58:48 2010
New Revision: 935706

URL: http://svn.apache.org/viewvc?rev=935706&view=rev
Log:
DERBY-4572: Documentation needed for user-defined types

Added 1 topic to Dev Guide; added 3 topics to Ref Manual, modified 9 more

Patch: DERBY-4572-2.diff

Added:
    db/derby/docs/trunk/src/devguide/cdevspecialudt.dita   (with props)
    db/derby/docs/trunk/src/ref/rrefsqljcreatetype.dita   (with props)
    db/derby/docs/trunk/src/ref/rrefsqljdroptype.dita   (with props)
    db/derby/docs/trunk/src/ref/rrefsqljudt.dita   (with props)
Modified:
    db/derby/docs/trunk/src/devguide/derbydev.ditamap
    db/derby/docs/trunk/src/ref/refderby.ditamap
    db/derby/docs/trunk/src/ref/rrefsistabs22441.dita
    db/derby/docs/trunk/src/ref/rrefsistabs28114.dita
    db/derby/docs/trunk/src/ref/rrefsistabssysperms.dita
    db/derby/docs/trunk/src/ref/rrefsqlj58560.dita
    db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita
    db/derby/docs/trunk/src/ref/rrefsqljcreatesequence.dita
    db/derby/docs/trunk/src/ref/rrefsqljdropsequence.dita
    db/derby/docs/trunk/src/ref/rrefsqljgrant.dita
    db/derby/docs/trunk/src/ref/rrefsqljrevoke.dita

Added: db/derby/docs/trunk/src/devguide/cdevspecialudt.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/cdevspecialudt.dita?rev=935706&view=auto
==============================================================================
--- db/derby/docs/trunk/src/devguide/cdevspecialudt.dita (added)
+++ db/derby/docs/trunk/src/devguide/cdevspecialudt.dita Mon Apr 19 18:58:48 2010
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
+ "../dtd/concept.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+   http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<concept id="cdevspecialudt" xml:lang="en-us">
+<title>Programming user-defined types</title>
+<shortdesc><ph conref="../conrefs.dita#prod/productshortname"></ph> allows
+you to create user-defined types. A user-defined type is a serializable Java
+class whose instances are stored in columns. The class must implement the
+<i>java.io.Serializable</i> interface, and it must be declared to
+<ph conref="../conrefs.dita#prod/productshortname"></ph> by means of a
+CREATE TYPE statement.</shortdesc>
+<prolog><metadata>
+<keywords><indexterm>types<indexterm>user-defined</indexterm></indexterm>
+<indexterm>user-defined types<indexterm>programming</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<conbody>
+<section>
+
+<p>The key to designing a good user-defined type is to remember that data
+evolves over time, just like code. A good user-defined type has version
+information built into it. This allows the user-defined data to upgrade itself
+as the application changes. For this reason, it is a good idea for a
+user-defined type to implement <i>java.io.Externalizable</i> and not just
+<i>java.io.Serializable</i>. Although the SQL standard allows a Java class to
+implement only <i>java.io.Serializable</i>, this is bad practice for the
+following reasons:</p>
+<ul>
+<li><b>Recompilation</b> - If the second version of your application is
+compiled on a different platform from the first version, then your serialized
+objects may fail to deserialize. This problem and a possible workaround are
+discussed in the "Version Control" section near the end of this
+<xref format="html"
+href="http://java.sun.com/developer/technicalArticles/Programming/serialization/"
+scope="external">Serialization Primer</xref> and in the last paragraph of the
+header comment for <i>java.io.Serializable</i>.</li>
+<li><b>Evolution</b> - Your tools for evolving a class which simply implements
+<i>java.io.Serializable</i> are very limited.</li>
+</ul>
+<p>Fortunately, it is easy to write a version-aware UDT which implements
+<i>java.io.Serializable</i> and can evolve itself over time. For example, here
+is the first version of such a class:</p>
+<codeblock>
+package com.acme.types;
+
+import java.io.*;
+import java.math.*;
+
+public class Price implements Externalizable
+{
+    // initial version id
+    private static final int FIRST_VERSION = 0;
+
+    public String currencyCode;
+    public BigDecimal amount;
+
+    // zero-arg constructor needed by Externalizable machinery
+    public Price() {}
+
+    public Price( String currencyCode, BigDecimal amount )
+    {
+        this.currencyCode = currencyCode;
+        this.amount = amount;
+    }
+
+    // Externalizable implementation
+    public void writeExternal(ObjectOutput out) throws IOException
+    {
+        // first write the version id
+        out.writeInt( FIRST_VERSION );
+
+        // now write the state
+        out.writeObject( currencyCode );
+        out.writeObject( amount );
+    }
+    
+    public void readExternal(ObjectInput in) 
+        throws IOException, ClassNotFoundException
+    {
+        // read the version id
+        int oldVersion = in.readInt();
+        if ( oldVersion &lt; FIRST_VERSION ) { 
+            throw new IOException( "Corrupt data stream." ); 
+        }
+        if ( oldVersion &gt; FIRST_VERSION ) { 
+            throw new IOException( "Can't deserialize from the future." );
+        }
+
+        currencyCode = (String) in.readObject();
+        amount = (BigDecimal) in.readObject();
+    }
+}</codeblock>
+<p>After this, it is easy to write a second version of the user-defined type
+which adds a new field. When old versions of <codeph>Price</codeph> values are
+read from the database, they upgrade themselves on the fly. Changes are shown
+in <b>bold</b>:</p>
+<codeblock>
+package com.acme.types;
+
+import java.io.*;
+import java.math.*;
+<b>import java.sql.*;</b>
+
+public class Price implements Externalizable
+{
+    // initial version id
+    private static final int FIRST_VERSION = 0;
+    <b>private static final int TIMESTAMPED_VERSION = FIRST_VERSION + 1;</b>
+
+    <b>private static final Timestamp DEFAULT_TIMESTAMP = new Timestamp( 0L );</b>
+
+    public String currencyCode;
+    public BigDecimal amount;
+    <b>public Timestamp timeInstant;</b>
+
+    // 0-arg constructor needed by Externalizable machinery
+    public Price() {}
+
+    public Price( String currencyCode, BigDecimal amount<b>, 
+                  Timestamp timeInstant</b> )
+    {
+        this.currencyCode = currencyCode;
+        this.amount = amount;
+        <b>this.timeInstant = timeInstant;</b>
+    }
+
+    // Externalizable implementation
+    public void writeExternal(ObjectOutput out) throws IOException
+    {
+        // first write the version id
+        out.writeInt( <b>TIMESTAMPED_VERSION</b> );
+
+        // now write the state
+        out.writeObject( currencyCode );
+        out.writeObject( amount );
+        <b>out.writeObject( timeInstant );</b>
+    }
+      
+    public void readExternal(ObjectInput in) 
+        throws IOException, ClassNotFoundException
+    {
+        // read the version id
+        int oldVersion = in.readInt();
+        if ( oldVersion &lt; FIRST_VERSION ) { 
+            throw new IOException( "Corrupt data stream." ); 
+        }
+        if ( oldVersion &gt; <b>TIMESTAMPED_VERSION</b> ) {
+            throw new IOException( "Can't deserialize from the future." ); 
+        }
+
+        currencyCode = (String) in.readObject();
+        amount = (BigDecimal) in.readObject();
+
+        <b>if ( oldVersion &gt;= TIMESTAMPED_VERSION ) {
+            timeInstant = (Timestamp) in.readObject(); 
+        }
+        else { 
+            timeInstant = DEFAULT_TIMESTAMP;</b> 
+        }
+    }
+}</codeblock>
+<p>An application needs to keep its code in sync across all tiers. This is true
+for all Java code which runs both in the client and in the server. This is true
+for functions and procedures which run in multiple tiers. It is also true for
+user-defined types which run in multiple tiers. The programmer should code
+defensively for the case when the client and server are running different
+versions of the application code. In particular, the programmer should write
+defensive serialization logic for user-defined types so that the application
+gracefully handles client/server version mismatches.</p>
+</section>
+</conbody>
+</concept>

Propchange: db/derby/docs/trunk/src/devguide/cdevspecialudt.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/docs/trunk/src/devguide/derbydev.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/devguide/derbydev.ditamap?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/devguide/derbydev.ditamap (original)
+++ db/derby/docs/trunk/src/devguide/derbydev.ditamap Mon Apr 19 18:58:48 2010
@@ -1926,6 +1926,8 @@ in the classpath"></topicref>
 </topicref>
 </topicref>
 </topicref>
+<topicref href="cdevspecialudt.dita" navtitle="Programming user-defined types">
+</topicref>
 </topicref>
 <topicref href="cdevconcepts19524.dita" navtitle="Controlling Derby application behavior">
 <topicref href="cdevconcepts38375.dita" navtitle="The JDBC Connection and Transaction Model">

Modified: db/derby/docs/trunk/src/ref/refderby.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/refderby.ditamap?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/refderby.ditamap (original)
+++ db/derby/docs/trunk/src/ref/refderby.ditamap Mon Apr 19 18:58:48 2010
@@ -172,6 +172,8 @@ limitations under the License.
 <topicref href="rrefsqlj89752.dita" navtitle="ReferencingClause" toc="no">
 </topicref>
 </topicref>
+<topicref href="rrefsqljcreatetype.dita" navtitle="CREATE TYPE statement">
+</topicref>
 <topicref href="rrefsqlj15446.dita" navtitle="CREATE VIEW statement"></topicref>
 </topicref>
 <topicref href="rrefdeclaretemptable.dita" navtitle="DECLARE GLOBAL TEMPORARY TABLE statement">
@@ -191,6 +193,7 @@ limitations under the License.
 </topicref>
 <topicref href="rrefsqlj34148.dita" navtitle="DROP TABLE statement"></topicref>
 <topicref href="rrefsqlj42082.dita" navtitle="DROP TRIGGER statement"></topicref>
+<topicref href="rrefsqljdroptype.dita" navtitle="DROP TYPE statement"></topicref>
 <topicref href="rrefsqlj61102.dita" navtitle="DROP VIEW statement"></topicref>
 </topicref>
 <topicref href="rrefsqljgrant.dita" navtitle="GRANT statement"></topicref>
@@ -455,6 +458,7 @@ data type"></topicref>
 <topicref href="rrefsqlj16221.dita" navtitle="SMALLINT data type"></topicref>
 <topicref href="rrefsqlj21908.dita" navtitle="TIME data type"></topicref>
 <topicref href="rrefsqlj27620.dita" navtitle="TIMESTAMP data type"></topicref>
+<topicref href="rrefsqljudt.dita" navtitle="User-defined types"></topicref>
 <topicref href="rrefsqlj41207.dita" navtitle="VARCHAR data type"></topicref>
 <topicref href="rrefsqlj32714.dita" navtitle="VARCHAR FOR BIT DATA data type">
 </topicref>

Modified: db/derby/docs/trunk/src/ref/rrefsistabs22441.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsistabs22441.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsistabs22441.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsistabs22441.dita Mon Apr 19 18:58:48 2010
@@ -20,7 +20,7 @@ limitations under the License.
 <reference id="rrefsistabs22441" xml:lang="en-us">
 <title>SYSCOLUMNS system table</title>
 <refbody>
-<section><p>Describes the columns within all tables in the current database:
+<section><p>Describes the columns within all tables in the current database:</p>
 <table pgwide="1" frame="all">
 <tgroup cols="5" colsep="1" rowsep="1"><colspec colname="1" colnum="1" colwidth="29*"/>
 <colspec colname="2" colnum="2" colwidth="23*"/><colspec colname="3" colnum="3"
@@ -48,30 +48,33 @@ colnum="5" colwidth="26*"/>
 <entry colname="2">CHAR</entry>
 <entry colname="3">128</entry>
 <entry colname="4">false</entry>
-<entry colname="5">column or parameter name</entry>
+<entry colname="5">Column or parameter name</entry>
 </row>
 <row>
 <entry colname="1">COLUMNNUMBER</entry>
 <entry colname="2">INT</entry>
 <entry colname="3">4</entry>
 <entry colname="4">false</entry>
-<entry colname="5">the position of the column within the table</entry>
+<entry colname="5">The position of the column within the table</entry>
 </row>
 <row>
 <entry colname="1">COLUMNDATATYPE</entry>
-<entry colname="2">org.apache.derby.catalog. TypeDescriptor   <p>This class
+<entry colname="2"><i>org.apache.derby.catalog.
+TypeDescriptor</i>   <p>This class
 is not part of the public API.</p></entry>
-<entry colname="3"></entry>
+<entry colname="3">&nbsp;</entry>
 <entry colname="4">false</entry>
-<entry colname="5">system type that describes precision, length, scale, nullability,
-type name, and storage type of data</entry>
+<entry colname="5">System type that describes precision, length, scale, nullability,
+type name, and storage type of data. For a user-defined type, this column can
+hold a <i>TypeDescriptor</i> that refers to the appropriate type alias in
+SYS.SYSALIASES.</entry>
 </row>
 <row>
 <entry colname="1">COLUMNDEFAULT</entry>
 <entry colname="2"><i>java.io.Serializable</i></entry>
-<entry colname="3"></entry>
+<entry colname="3">&nbsp;</entry>
 <entry colname="4">true</entry>
-<entry colname="5">for tables, describes default value of the column. The <i>toString()</i> method
+<entry colname="5">For tables, describes default value of the column. The <i>toString()</i> method
 on the object stored in the table returns the text of the default value as
 specified in the CREATE TABLE or ALTER TABLE statement.</entry>
 </row>
@@ -80,34 +83,34 @@ specified in the CREATE TABLE or ALTER T
 <entry colname="2">CHAR</entry>
 <entry colname="3">36</entry>
 <entry colname="4">true</entry>
-<entry colname="5">unique identifier for the default value </entry>
+<entry colname="5">Unique identifier for the default value </entry>
 </row>
 <row>
 <entry colname="1">AUTOINCREMENT COLUMNVALUE</entry>
 <entry colname="2">BIGINT</entry>
-<entry colname="3"></entry>
+<entry colname="3">&nbsp;</entry>
 <entry colname="4">true</entry>
-<entry colname="5">what the next value for column will be, if the column is
+<entry colname="5">What the next value for column will be, if the column is
 an identity column</entry>
 </row>
 <row>
 <entry colname="1">AUTOINCREMENT COLUMNSTART</entry>
 <entry colname="2">BIGINT</entry>
-<entry colname="3"></entry>
+<entry colname="3">&nbsp;</entry>
 <entry colname="4">true</entry>
-<entry colname="5">initial value of column (if specified), if it is an identity
+<entry colname="5">Initial value of column (if specified), if it is an identity
 column</entry>
 </row>
 <row>
 <entry colname="1">AUTOINCREMENT COLUMNINC</entry>
 <entry colname="2">BIGINT</entry>
-<entry colname="3"></entry>
+<entry colname="3">&nbsp;</entry>
 <entry colname="4">true</entry>
-<entry colname="5">amount column value is automatically incremented (if specified),
+<entry colname="5">Amount column value is automatically incremented (if specified),
 if the column is an identity column</entry>
 </row>
 </tbody>
 </tgroup>
-</table></p></section>
+</table></section>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsistabs28114.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsistabs28114.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsistabs28114.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsistabs28114.dita Mon Apr 19 18:58:48 2010
@@ -21,8 +21,9 @@ limitations under the License.
 <reference id="rrefsistabs28114" xml:lang="en-us">
 <title>SYSALIASES system table</title>
 <refbody>
-<section><p>Describes the procedures and functions in the database.   <table
-pgwide="1" frame="all">
+<section><p>Describes the procedures, functions, and user-defined types in the
+database.</p>
+<table pgwide="1" frame="all">
 <tgroup cols="5" colsep="1" rowsep="1"><colspec colname="1" colnum="1" colwidth="18*"/>
 <colspec colname="2" colnum="2" colwidth="29*"/><colspec colname="3" colnum="3"
 colwidth="10*"/><colspec colname="4" colnum="4" colwidth="14*"/><colspec colname="5"
@@ -42,56 +43,59 @@ colnum="5" colwidth="29*"/>
 <entry colname="2">CHAR</entry>
 <entry colname="3">36</entry>
 <entry colname="4">false</entry>
-<entry colname="5">unique identifier for the alias</entry>
+<entry colname="5">Unique identifier for the alias</entry>
 </row>
 <row>
 <entry colname="1">ALIAS</entry>
 <entry colname="2">VARCHAR</entry>
 <entry colname="3">128</entry>
 <entry colname="4">false</entry>
-<entry colname="5">alias</entry>
+<entry colname="5">Alias (in the case of a user-defined type, the name of the
+user-defined type)</entry>
 </row>
 <row>
 <entry colname="1">SCHEMAID</entry>
 <entry colname="2">CHAR</entry>
 <entry colname="3">36</entry>
 <entry colname="4">true</entry>
-<entry colname="5">reserved for future use</entry>
+<entry colname="5">Reserved for future use</entry>
 </row>
 <row>
 <entry colname="1">JAVACLASSNAME</entry>
 <entry colname="2">LONGVARCHAR</entry>
 <entry colname="3">255</entry>
 <entry colname="4">false</entry>
-<entry colname="5">the Java class name</entry>
+<entry colname="5">The Java class name</entry>
 </row>
 <row>
 <entry colname="1">ALIASTYPE</entry>
 <entry colname="2">CHAR</entry>
 <entry colname="3">1</entry>
 <entry colname="4">false</entry>
-<entry colname="5"><i>'F'</i> (function)<i>'P'</i> (procedure)</entry>
+<entry colname="5"><i>'F'</i> (function), <i>'P'</i> (procedure),
+<i>'A'</i> (user-defined type)</entry>
 </row>
 <row>
 <entry colname="1">NAMESPACE</entry>
 <entry colname="2">CHAR</entry>
 <entry colname="3">1</entry>
 <entry colname="4">false</entry>
-<entry colname="5"><i>'F'</i> (function)<i>'P'</i> (procedure)</entry>
+<entry colname="5"><i>'F'</i> (function), <i>'P'</i> (procedure),
+<i>'A'</i> (user-defined type)</entry>
 </row>
 <row>
 <entry colname="1">SYSTEMALIAS</entry>
 <entry colname="2">BOOLEAN</entry>
-<entry colname="3"></entry>
+<entry colname="3">&nbsp;</entry>
 <entry colname="4">false</entry>
 <entry colname="5"><i>true</i> (system supplied or built-in alias)   <p><i>false</i> (alias
 created by a user)</p></entry>
 </row>
 <row>
 <entry colname="1">ALIASINFO</entry>
-<entry colname="2"> <lines>org.apache.derby.
-catalog.AliasInfo:</lines> <p>This class is not part of the public API</p></entry>
-<entry colname="3"></entry>
+<entry colname="2"><i>org.apache.derby.
+catalog.AliasInfo</i> <p>This class is not part of the public API.</p></entry>
+<entry colname="3">&nbsp;</entry>
 <entry colname="4">true</entry>
 <entry colname="5">A Java interface that encapsulates the additional information
 that is specific to an alias</entry>
@@ -101,10 +105,10 @@ that is specific to an alias</entry>
 <entry colname="2">VARCHAR</entry>
 <entry colname="3">128</entry>
 <entry colname="4">false</entry>
-<entry colname="5">system-generated identifier</entry>
+<entry colname="5">System-generated identifier</entry>
 </row>
 </tbody>
 </tgroup>
-</table></p></section>
+</table></section>
 </refbody>
 </reference>

Modified: db/derby/docs/trunk/src/ref/rrefsistabssysperms.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsistabssysperms.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsistabssysperms.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsistabssysperms.dita Mon Apr 19 18:58:48 2010
@@ -23,10 +23,11 @@ under the License.    
 <reference id="rrefsistabssysperms" xml:lang="en-us">
 <title>SYSPERMS system table</title>
 <shortdesc>The SYSPERMS system table describes the USAGE permissions for
-sequence generators.</shortdesc>
+sequence generators and user-defined types.</shortdesc>
 <prolog><metadata>
 <keywords><indexterm>system tables<indexterm>SYSPERMS</indexterm></indexterm>
 <indexterm>sequence generators<indexterm>SYSPERMS system table</indexterm></indexterm>
+<indexterm>user-defined types<indexterm>SYSPERMS system table</indexterm></indexterm>
 <indexterm>SYSPERMS system table</indexterm></keywords>
 </metadata></prolog>
 <refbody>
@@ -59,15 +60,18 @@ colnum="5" colwidth="38*"/>
 <entry colname="3">36</entry>
 <entry colname="4">False</entry>
 <entry colname="5">The kind of object receiving the permission. The only valid
-value is 'SEQUENCE'.</entry>
+values are 'SEQUENCE' and 'USER-DEFINED TYPE'.</entry>
 </row>
 <row>
 <entry colname="1">OBJECTID</entry>
 <entry colname="2">CHAR</entry>
 <entry colname="3">36</entry>
 <entry colname="4">False</entry>
-<entry colname="5">The object receiving the permission. The only valid values
-are SEQUENCEIDs.</entry>
+<entry colname="5">The UUID of the object receiving the permission. For
+sequence generators, the only valid values are SEQUENCEIDs in the
+SYS.SYSSEQUENCES table. For user-defined types, the only valid values are
+ALIASIDs in the SYS.SYSALIASES table if the SYSALIASES row describes a
+user-defined type.</entry>
 </row>
 <row>
 <entry colname="1">PERMISSION</entry>
@@ -97,9 +101,9 @@ privilege was granted.</entry>
 <entry colname="2">CHAR</entry>
 <entry colname="3">1</entry>
 <entry colname="4">False</entry>
-<entry colname="5">If the GRANTEE is the owner of the sequence generator, this
-value is 'Y'. If the GRANTEE is not the owner of the sequence generator, this
-value is 'N'.</entry>
+<entry colname="5">If the GRANTEE is the owner of the sequence generator or
+user-defined type, this value is 'Y'. If the GRANTEE is not the owner of the
+sequence generator or user-defined type, this value is 'N'.</entry>
 </row>
 </tbody>
 </tgroup>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj58560.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj58560.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj58560.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj58560.dita Mon Apr 19 18:58:48 2010
@@ -39,7 +39,7 @@ colwidth="84*"/><colspec colname="colspe
 colwidth="81*"/><colspec colname="colspec2" colwidth="84*"/><colspec colname="colspec10"
 colwidth="84*"/><colspec colname="colspec13" colwidth="84*"/><colspec colname="colspec12"
 colwidth="84*"/><colspec colname="colspec11" colwidth="84*"/><colspec colname="COLSPEC14"
-colwidth="84*"/>
+colwidth="84*"/><colspec colname="colspec15" colwidth="84*"/>
 <thead>
 <row>
 <entry colname="colspec0" valign="top">Types</entry>
@@ -199,6 +199,23 @@ P</lines></entry>
 <entry colname="COLSPEC14" valign="top"> <lines>X
 M
 L</lines></entry>
+<entry colname="colspec15" valign="top"> <lines>U
+s
+e
+r
+-
+d
+e
+f
+i
+n
+e
+d
+
+t
+y
+p
+e</lines></entry>
 </row>
 </thead>
 <tbody>
@@ -223,6 +240,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">INTEGER</entry>
@@ -245,6 +263,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">BIGINT</entry>
@@ -267,6 +286,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">DECIMAL</entry>
@@ -289,6 +309,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">REAL</entry>
@@ -311,6 +332,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">DOUBLE</entry>
@@ -333,6 +355,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">FLOAT</entry>
@@ -355,6 +378,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">CHAR</entry>
@@ -377,6 +401,7 @@ L</lines></entry>
 <entry colname="colspec12">Y</entry>
 <entry colname="colspec11">Y</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">VARCHAR</entry>
@@ -399,6 +424,7 @@ L</lines></entry>
 <entry colname="colspec12">Y</entry>
 <entry colname="colspec11">Y</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">LONG VARCHAR</entry>
@@ -421,6 +447,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">CHAR FOR BIT DATA</entry>
@@ -443,6 +470,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">VARCHAR FOR BIT DATA</entry>
@@ -465,6 +493,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">LONG VARCHAR FOR BIT DATA</entry>
@@ -487,6 +516,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">CLOB</entry>
@@ -509,6 +539,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">BLOB</entry>
@@ -531,6 +562,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">DATE</entry>
@@ -553,6 +585,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">TIME</entry>
@@ -575,9 +608,10 @@ L</lines></entry>
 <entry colname="colspec12">Y</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
-<entry colname="colspec0">TIME STAMP</entry>
+<entry colname="colspec0">TIMESTAMP</entry>
 <entry colname="col2">-</entry>
 <entry colname="col3">-</entry>
 <entry colname="col4">-</entry>
@@ -597,6 +631,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">Y</entry>
 <entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">-</entry>
 </row>
 <row>
 <entry colname="colspec0">XML</entry>
@@ -619,10 +654,37 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC14">Y</entry>
+<entry colname="colspec15">-</entry>
+</row>
+<row>
+<entry colname="colspec0">User-defined type</entry>
+<entry colname="col2">-</entry>
+<entry colname="col3">-</entry>
+<entry colname="col4">-</entry>
+<entry colname="col5">-</entry>
+<entry colname="col6">-</entry>
+<entry colname="colspec1">-</entry>
+<entry colname="colspec9">-</entry>
+<entry colname="colspec8">-</entry>
+<entry colname="colspec7">-</entry>
+<entry colname="colspec6">-</entry>
+<entry colname="colspec5">-</entry>
+<entry colname="colspec4">-</entry>
+<entry colname="colspec3">-</entry>
+<entry colname="colspec2">-</entry>
+<entry colname="colspec10">-</entry>
+<entry colname="colspec13">-</entry>
+<entry colname="colspec12">-</entry>
+<entry colname="colspec11">-</entry>
+<entry colname="COLSPEC14">-</entry>
+<entry colname="colspec15">Y</entry>
 </row>
 </tbody>
 </tgroup>
 </table>
+<section><p>A value of a user-defined type can be assigned to a value of any supertype of
+that user-defined type. However, no explicit casts of user-defined types are
+allowed.</p></section>
 <table><title>Comparisons allowed by Derby</title><desc>This table displays
 valid comparisons between data types in <ph conref="../conrefs.dita#prod/productshortname"></ph>.
 A "Y" indicates that the comparison is allowed.</desc>
@@ -636,7 +698,7 @@ colwidth="83*"/><colspec colname="colspe
 colwidth="80*"/><colspec colname="colspec2" colwidth="83*"/><colspec colname="colspec10"
 colwidth="83*"/><colspec colname="colspec13" colwidth="75*"/><colspec colname="colspec12"
 colwidth="89*"/><colspec colname="colspec11" colwidth="89*"/><colspec colname="COLSPEC15"
-colwidth="89*"/>
+colwidth="89*"/><colspec colname="colspec14" colwidth="80*"/>
 <thead>
 <row>
 <entry colname="colspec0" valign="top">Types</entry>
@@ -796,6 +858,23 @@ P</lines></entry>
 <entry colname="COLSPEC15" valign="top"> <lines>X
 M
 L</lines></entry>
+<entry colname="colspec14" valign="top"> <lines>U
+s
+e
+r
+-
+d
+e
+f
+i
+n
+e
+d
+
+t
+y
+p
+e</lines></entry>
 </row>
 </thead>
 <tbody>
@@ -864,6 +943,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">DECIMAL</entry>
@@ -886,6 +966,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">REAL</entry>
@@ -908,6 +989,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">DOUBLE</entry>
@@ -930,6 +1012,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">FLOAT</entry>
@@ -952,6 +1035,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">CHAR</entry>
@@ -974,6 +1058,7 @@ L</lines></entry>
 <entry colname="colspec12">Y</entry>
 <entry colname="colspec11">Y</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">VARCHAR</entry>
@@ -996,6 +1081,7 @@ L</lines></entry>
 <entry colname="colspec12">Y</entry>
 <entry colname="colspec11">Y</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">LONG VARCHAR</entry>
@@ -1018,6 +1104,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">CHAR FOR BIT DATA</entry>
@@ -1040,6 +1127,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">VARCHAR FOR BIT DATA</entry>
@@ -1062,6 +1150,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">LONG VARCHAR FOR BIT DATA</entry>
@@ -1084,6 +1173,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">CLOB</entry>
@@ -1106,6 +1196,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">BLOB</entry>
@@ -1128,6 +1219,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">DATE</entry>
@@ -1150,6 +1242,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">TIME</entry>
@@ -1172,9 +1265,10 @@ L</lines></entry>
 <entry colname="colspec12">Y</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
-<entry colname="colspec0">TIME STAMP</entry>
+<entry colname="colspec0">TIMESTAMP</entry>
 <entry colname="col2">-</entry>
 <entry colname="col3">-</entry>
 <entry colname="col4">-</entry>
@@ -1194,6 +1288,7 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">Y</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 <row>
 <entry colname="colspec0">XML</entry>
@@ -1216,6 +1311,30 @@ L</lines></entry>
 <entry colname="colspec12">-</entry>
 <entry colname="colspec11">-</entry>
 <entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
+</row>
+<row>
+<entry colname="colspec0">User-defined type</entry>
+<entry colname="col2">-</entry>
+<entry colname="col3">-</entry>
+<entry colname="col4">-</entry>
+<entry colname="col5">-</entry>
+<entry colname="col6">-</entry>
+<entry colname="colspec1">-</entry>
+<entry colname="colspec9">-</entry>
+<entry colname="colspec8">-</entry>
+<entry colname="colspec7">-</entry>
+<entry colname="colspec6">-</entry>
+<entry colname="colspec5">-</entry>
+<entry colname="colspec4">-</entry>
+<entry colname="colspec3">-</entry>
+<entry colname="colspec2">-</entry>
+<entry colname="colspec10">-</entry>
+<entry colname="colspec13">-</entry>
+<entry colname="colspec12">-</entry>
+<entry colname="colspec11">-</entry>
+<entry colname="COLSPEC15">-</entry>
+<entry colname="colspec14">-</entry>
 </row>
 </tbody>
 </tgroup>

Modified: db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljargmatching.dita Mon Apr 19 18:58:48 2010
@@ -28,9 +28,12 @@ limitations under the License.
 
 <p>
 When you declare a function or procedure using CREATE
-FUNCTION/PROCEDURE, Derby does not verify whether a matching Java
-method exists. Instead, Derby looks for a matching method only when you invoke the
-function or procedure in a later SQL statement. At that time, Derby
+FUNCTION/PROCEDURE, <ph conref="../conrefs.dita#prod/productshortname"></ph>
+does not verify whether a matching Java
+method exists. Instead, <ph conref="../conrefs.dita#prod/productshortname"></ph>
+looks for a matching method only when you invoke the
+function or procedure in a later SQL statement. At that time,
+<ph conref="../conrefs.dita#prod/productshortname"></ph>
 searches for a public, static method having the class and method name
 declared in the EXTERNAL NAME clause of the earlier
 CREATE FUNCTION/PROCEDURE statement. Furthermore, the Java types of
@@ -40,41 +43,55 @@ following may happen:
 </p>
 
 <ul>
-<li><b>Success</b> - If exactly one Java method matches, then Derby
-invokes it.</li>
-<li><b>Ambiguity</b> - Derby raises an error if more than one method matches.</li>
-<li><b>Failure</b> - Derby also raises an error if no method matches.</li>
+<li><b>Success</b> - If exactly one Java method matches, then
+<ph conref="../conrefs.dita#prod/productshortname"></ph> invokes it.</li>
+<li><b>Ambiguity</b> - <ph conref="../conrefs.dita#prod/productshortname"></ph>
+raises an error if more than one method matches.</li>
+<li><b>Failure</b> - <ph conref="../conrefs.dita#prod/productshortname"></ph>
+also raises an error if no method matches.</li>
 </ul>
 
 <p>
-In mapping SQL data types to Java data types, Derby considers the following
+In mapping SQL data types to Java data types,
+<ph conref="../conrefs.dita#prod/productshortname"></ph> considers the following
 kinds of matches:
 </p>
 
 <ul>
-<li><b>Primitive match</b> - Derby looks for a primitive Java type
-corresponding to the SQL type. For instance, SQL INTEGER matches Java <i>int</i>.</li>
-<li><b>Wrapper match</b> - Derby looks for a wrapper class
-in the <i>java.lang</i> or <i>java.sql</i> packages corresponding to the SQL type. For instance, SQL
-INTEGER matches <i>java.lang.Integer</i>.</li>
-<li><b>Array match</b> - For OUT and INOUT procedure arguments, Derby
+<li><b>Primitive match</b> -
+<ph conref="../conrefs.dita#prod/productshortname"></ph> looks for a primitive
+Java type corresponding to the SQL type. For instance, SQL INTEGER matches Java
+<i>int</i>.</li>
+<li><b>Wrapper match</b> -
+<ph conref="../conrefs.dita#prod/productshortname"></ph> looks for a wrapper
+class in the <i>java.lang</i> or <i>java.sql</i> packages corresponding to the
+SQL type. For instance, SQL INTEGER matches <i>java.lang.Integer</i>. For a
+user-defined type (UDT),
+<ph conref="../conrefs.dita#prod/productshortname"></ph> looks for the UDT's
+external name class.</li>
+<li><b>Array match</b> - For OUT and INOUT procedure arguments,
+<ph conref="../conrefs.dita#prod/productshortname"></ph>
 looks for an array of the corresponding primitive or wrapper type. For
 instance, an OUT procedure argument of type SQL INTEGER matches
 <i>int[]</i> and <i>Integer[]</i>.</li>
 <li><b>ResultSet match</b> - If a procedure is declared to return <i>n</i>
-RESULT SETS, then Derby looks for a method whose last <i>n</i> arguments are
+RESULT SETS, <ph conref="../conrefs.dita#prod/productshortname"></ph> looks for
+a method whose last <i>n</i> arguments are
 of type <i>java.sql.ResultSet[]</i>.</li>
 </ul>
 
 <p>
-Derby resolves function and procedure invocations as follows:
+<ph conref="../conrefs.dita#prod/productshortname"></ph> resolves function and
+procedure invocations as follows:
 </p>
 
 <ul>
-<li><b>Function</b> - Derby looks for a method whose argument and
+<li><b>Function</b> - <ph conref="../conrefs.dita#prod/productshortname"></ph>
+looks for a method whose argument and
 return types are <i>primitive match</i>es or <i>wrapper match</i>es for
 the function's SQL arguments and return value.</li>
-<li><b>Procedure</b> - Derby looks for a method which returns void and
+<li><b>Procedure</b> - <ph conref="../conrefs.dita#prod/productshortname"></ph>
+looks for a method which returns void and
 whose argument types match as follows:
   <ul>
   <li><i>IN</i> - Method arguments are
@@ -122,7 +139,8 @@ public static Double toDegrees( Double a
 </b></codeblock>
 
 <p>
-Note that Derby would raise an exception if Derby found more than one matching method.
+Note that <ph conref="../conrefs.dita#prod/productshortname"></ph> would raise
+an exception if it found more than one matching method.
 </p>
 
 </section>
@@ -131,8 +149,9 @@ Note that Derby would raise an exception
 <section><title>Mapping SQL data types to Java data types</title>
 
 <p>
-The following table shows how Derby maps specific SQL data types to Java
-data types:
+The following table shows how
+<ph conref="../conrefs.dita#prod/productshortname"></ph> maps specific SQL data
+types to Java data types:
 </p>
 
 <table>
@@ -273,6 +292,12 @@ data types:
       <entry colname="wrapper">-</entry>
     </row>
     
+    <row>
+      <entry colname="sqltype">User-defined type</entry>
+      <entry colname="primitive">-</entry>
+      <entry colname="wrapper">Underlying Java class</entry>
+    </row>
+    
 </tbody>
 </tgroup>
 </table>

Modified: db/derby/docs/trunk/src/ref/rrefsqljcreatesequence.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljcreatesequence.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljcreatesequence.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljcreatesequence.dita Mon Apr 19 18:58:48 2010
@@ -39,15 +39,14 @@ privilege cannot be revoked from the sch
 <xref href="rrefsqljrevoke.dita#rrefsqljrevoke"></xref> for more information.
 </p></section>
 <refsyn><title>Syntax</title>
-<codeblock><b>CREATE SEQUENCE <i><xref href="rrefsqljcreatesequence.dita#rrefsqljcreatesequence/rrefsqljcrseqsequencename">sequenceName</xref></i> [ <i><xref href="rrefsqljcreatesequence.dita#rrefsqljcreatesequence/rrefsqljcrseqsequenceelement">sequenceElement</xref></i> ]*</b></codeblock>
-</refsyn>
-<section id="rrefsqljcrseqsequencename"><title>sequenceName</title>
-<codeblock><b>[ <i><xref 
+<codeblock><b>CREATE SEQUENCE [ <i><xref 
 href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
-href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i></b></codeblock>
-<p>If <i>schemaName</i> is not provided, the current schema is the default
-schema. If a qualified sequence name is specified, the schema name cannot
-begin with SYS.</p></section>
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i> [ <i><xref
+href="rrefsqljcreatesequence.dita#rrefsqljcreatesequence/rrefsqljcrseqsequenceelement">sequenceElement</xref></i> ]*</b></codeblock>
+<p>The sequence name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified sequence name is specified, the
+schema name cannot begin with SYS.</p></refsyn>
 <section id="rrefsqljcrseqsequenceelement"><title>sequenceElement</title>
 <codeblock><b>{
   AS <i>dataType</i> 

Added: db/derby/docs/trunk/src/ref/rrefsqljcreatetype.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljcreatetype.dita?rev=935706&view=auto
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljcreatetype.dita (added)
+++ db/derby/docs/trunk/src/ref/rrefsqljcreatetype.dita Mon Apr 19 18:58:48 2010
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+ 
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<reference id="rrefsqljcreatetype" xml:lang="en-us">
+<title>CREATE TYPE statement</title>
+<prolog><metadata>
+<keywords><indexterm>CREATE TYPE statement</indexterm>
+<indexterm>SQL statements<indexterm>CREATE TYPE</indexterm></indexterm>
+<indexterm>user-defined types<indexterm>creating</indexterm></indexterm>
+<indexterm>data types<indexterm>user-defined</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<refbody>
+<section><p>
+The CREATE TYPE statement creates a user-defined type (UDT). A UDT is a
+serializable Java class whose instances are stored in columns. The class must
+implement the <i>java.io.Serializable</i> interface.</p></section>
+<refsyn><title>Syntax</title>
+<codeblock><b>CREATE TYPE [ <i><xref 
+href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i>
+EXTERNAL NAME <i>singleQuotedJavaClassName</i>
+LANGUAGE JAVA</b></codeblock>
+<p>The type name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified type name is specified, the schema
+name cannot begin with SYS.</p>
+<p>If the Java class does not implement <i>java.io.Serializable</i>, or if it is
+not public and visible on the classpath,
+<ph conref="../conrefs.dita#prod/productshortname"></ph> raises an exception
+when preparing statements which refer to the UDT.</p>
+<p>A UDT cannot be cast explicitly to any other type, and no other type can be
+cast to a UDT.</p>
+<p>A UDT has no ordering. This means that you cannot compare and sort UDTs. You
+cannot use them in expressions involving the <codeph>&lt;</codeph>,
+<codeph>=</codeph>, <codeph>&gt;</codeph>, IN, BETWEEN, and LIKE operators. You
+cannot use UDTs in aggregates, DISTINCT expressions, and GROUP/ORDER BY clauses.
+You cannot build indexes on them.</p>
+<p>You can use subtypes in UDTs. That is, if you use the CREATE TYPE statement
+to bind a class named C to a UDT, you can populate that UDT value with an
+instance of any subclass of C.</p>
+</refsyn>
+<example><title>Example</title>
+<codeblock><b>CREATE TYPE price
+EXTERNAL NAME 'com.acme.types.Price'
+LANGUAGE JAVA</b></codeblock>
+</example>
+<section><title>Using user-defined types</title>
+<p>You can create tables and views with columns that have UDTs. For example:</p>
+<codeblock><b>CREATE TABLE order
+(
+    orderID INT GENERATED ALWAYS AS IDENTITY,
+    customerID INT REFERENCES customer( customerID ),
+    totalPrice typeSchema.price
+);</b></codeblock>
+<p>Although UDTs have no natural order, you can use generated columns to provide
+useful sort orders:</p>
+<codeblock><b>ALTER TABLE order 
+  ADD COLUMN normalizedValue DECIMAL( 31, 5 ) GENERATED ALWAYS AS 
+    ( convert( 'EUR', TIMESTAMP('2005-01-01 09:00:00'), totalPrice ) );
+CREATE INDEX normalizedOrderPrice ON order( normalizedValue );</b></codeblock>
+<p>You can use factory functions to construct UDTs. For example:
+</p>
+<codeblock><b>INSERT INTO order( customerID, totalPrice )
+  VALUES ( 12345, 
+           makePrice( 'USD', 
+                      CAST( 9.99 AS DECIMAL( 31, 5 ) ), 
+                      TIMESTAMP('2009-10-16 14:24:43') ) );</b></codeblock>
+<p>Once a UDT column has been populated, you can use it in other INSERT and
+UPDATE statements. For example:</p>
+<codeblock><b>INSERT INTO backOrder SELECT * from order;
+
+UPDATE order SET totalPrice = ( SELECT todaysDiscount FROM discount );
+UPDATE order SET totalPrice = adjustForInflation( totalPrice );</b></codeblock>
+<p>Using functions, you can access fields inside UDTs in a SELECT statement:</p>
+<codeblock><b>SELECT getCurrencyCode( totalPrice ) from order;</b></codeblock>
+<p>You can use JDBC API <i>setObject()</i> and <i>getObject()</i> methods to
+store and retrieve values of UDTs. For example:</p>
+<codeblock><b>PreparedStatement ps = conn.prepareStatement( "SELECT * from order" );
+ResultSet rs = ps.executeQuery();
+
+while( rs.next() )
+{
+    int    orderID = rs.getInt( 1 );
+    int    customerID = rs.getInt( 2 );
+    Price  totalPrice = (Price) rs.getObject( 3 );
+    ...
+}</b></codeblock>
+</section>
+</refbody>
+</reference>

Propchange: db/derby/docs/trunk/src/ref/rrefsqljcreatetype.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/docs/trunk/src/ref/rrefsqljdropsequence.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljdropsequence.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljdropsequence.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljdropsequence.dita Mon Apr 19 18:58:48 2010
@@ -30,21 +30,20 @@ limitations under the License.
 <section><p>The DROP SEQUENCE statement removes a sequence generator that was
 created using a <xref href="rrefsqljcreatesequence.dita#rrefsqljcreatesequence"></xref>.</p></section>
 <refsyn><title>Syntax</title>
-<codeblock><b>DROP SEQUENCE <i><xref href="rrefsqljdropsequence.dita#rrefsqljdropsequence/rrefsqljdrseqsequencename">sequenceName</xref></i> RESTRICT
+<codeblock><b>DROP SEQUENCE [ <i><xref 
+href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i> RESTRICT
 </b></codeblock>
+<p>The sequence name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified sequence name is specified, the
+schema name cannot begin with SYS.</p>
 <p>The RESTRICT keyword is required. If a trigger or view references the
 sequence generator, <ph conref="../conrefs.dita#prod/productshortname"></ph>
 throws an exception.</p>
 <p>Dropping a sequence generator implicitly drops all USAGE privileges that
 reference it.</p>
 </refsyn>
-<section id="rrefsqljdrseqsequencename"><title>sequenceName</title>
-<codeblock><b>[ <i><xref 
-href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
-href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i></b></codeblock>
-<p>If <i>schemaName</i> is not provided, the current schema is the default
-schema. If a qualified sequence name is specified, the schema name cannot
-begin with SYS.</p></section>
 <example><title>Example</title>
 <codeblock><b>DROP SEQUENCE order_id RESTRICT;</b></codeblock>
 </example>

Added: db/derby/docs/trunk/src/ref/rrefsqljdroptype.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljdroptype.dita?rev=935706&view=auto
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljdroptype.dita (added)
+++ db/derby/docs/trunk/src/ref/rrefsqljdroptype.dita Mon Apr 19 18:58:48 2010
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+ 
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<reference id="rrefsqljdroptype" xml:lang="en-us">
+<title>DROP TYPE statement</title>
+<prolog><metadata>
+<keywords><indexterm>DROP TYPE statement</indexterm>
+<indexterm>SQL statements<indexterm>DROP TYPE</indexterm></indexterm>
+<indexterm>user-defined types<indexterm>dropping</indexterm></indexterm>
+<indexterm>data types<indexterm>user-defined</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<refbody>
+<section><p>The DROP TYPE statement removes a user-defined type (UDT) that was
+created using a
+<xref href="rrefsqljcreatetype.dita#rrefsqljcreatetype"></xref>.</p>
+</section>
+<refsyn><title>Syntax</title>
+<codeblock><b>DROP TYPE [ <i><xref 
+href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i> RESTRICT</b></codeblock>
+<p>The type name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified type name is specified, the schema
+name cannot begin with SYS.</p>
+<p>The RESTRICT keyword is required. CASCADE semantics are not supported. That
+is, <ph conref="../conrefs.dita#prod/productshortname"></ph> will not track down
+and drop orphaned objects.</p>
+<p>Dropping a UDT implicitly drops all USAGE privileges that reference it.</p>
+<p>You cannot drop a type if it would make another SQL object unusable. This
+includes the following restrictions:</p>
+<ul>
+<li>Table columns: No table columns have this UDT.</li>
+<li>Views: No view definition involves expressions which have this UDT.</li>
+<li>Constraints: No constraints reference expressions of this UDT.</li>
+<li>Generated columns: No generated columns reference expressions of this
+UDT.</li>
+<li>Routines: No functions or procedures have arguments or return values of this
+UDT.</li>
+<li>Table Functions: No table functions return tables with columns of this
+UDT.</li>
+</ul>
+</refsyn>
+<example><title>Example</title>
+<codeblock><b>DROP TYPE price RESTRICT;</b></codeblock>
+</example>
+</refbody>
+</reference>

Propchange: db/derby/docs/trunk/src/ref/rrefsqljdroptype.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/docs/trunk/src/ref/rrefsqljgrant.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljgrant.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljgrant.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljgrant.dita Mon Apr 19 18:58:48 2010
@@ -40,7 +40,7 @@ from a table.</li>
 <li>Create a trigger on a table.</li>
 <li>Update data in a table or in a subset of columns in a table.</li>
 <li>Run a specified function or procedure.</li>
-<li>Use a sequence generator.</li>
+<li>Use a sequence generator or a user-defined type.</li>
 </ul></p><p>Before you issue a GRANT statement, check that the
 <codeph><xref href="rrefpropersqlauth.dita#rrefpropersqlauth">derby.database.sqlAuthorization</xref></codeph> property
 is set to <codeph>true</codeph>. The <codeph>derby.database.sqlAuthorization</codeph> property
@@ -50,7 +50,7 @@ object if you are the owner of the objec
 CREATE statement for the database object that you want to grant privileges on
 for more information.</p><p>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.</p>
+privileges to a schema object or granting a role.</p>
 <p>For more information on using the GRANT statement, see "Using SQL standard
 authorization" in the <ph conref="../conrefs.dita#pub/citdevelop"></ph>.</p>
 </section>
@@ -62,11 +62,29 @@ href="rrefviewname.dita#rrefviewname"></
 href="rrefsqljgrant.dita#rrefsqljgrant/grantroutinename">routine-designator</xref></i> TO <i><xref
 href="rrefsqljgrant.dita#rrefsqljgrant/grantgrantees">grantees</xref></i></b></codeblock></section>
 <section id="grantsequencesyn"><title>Syntax for sequence generators</title>
-<codeblock><b>GRANT USAGE ON SEQUENCE <i><xref href="rrefsqljgrant.dita#rrefsqljgrant/rrefsqljgrseqsequencename">sequenceName</xref></i> TO <i><xref href="rrefsqljgrant.dita#rrefsqljgrant/grantgrantees">grantees</xref></i></b></codeblock>
+<codeblock><b>GRANT USAGE ON SEQUENCE [ <i><xref 
+href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i> TO <i><xref href="rrefsqljgrant.dita#rrefsqljgrant/grantgrantees">grantees</xref></i></b></codeblock>
 <p>In order to use a sequence generator, you must have the USAGE privilege on
 it. This privilege can be granted to users and to roles. See 
 <xref href="rrefsqljcreatesequence.dita#rrefsqljcreatesequence"></xref> for more
-information.</p></section>
+information.</p>
+<p>The sequence name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified sequence name is specified, the
+schema name cannot begin with SYS.</p></section>
+<section id="granttypesyn"><title>Syntax for user-defined types</title>
+<codeblock><b>GRANT USAGE ON TYPE [ <i><xref 
+href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i> TO <i><xref href="rrefsqljgrant.dita#rrefsqljgrant/grantgrantees">grantees</xref></i></b></codeblock>
+<p>In order to use a user-defined type, you must have the USAGE privilege on
+it. This privilege can be granted to users and to roles. See 
+<xref href="rrefsqljcreatetype.dita#rrefsqljcreatetype"></xref> for more
+information.</p>
+<p>The type name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified type name is specified, the schema
+name cannot begin with SYS.</p></section>
 <section id="grantrolesyn"><title>Syntax for roles</title>
 <codeblock><b>GRANT <i><xref href="rrefrolename.dita#rrefrolename">roleName</xref></i> [ {, <i><xref
 href="rrefrolename.dita#rrefrolename">roleName</xref></i> }* ] TO <i><xref 
@@ -140,13 +158,6 @@ role.</p></section>
 <section id="grantroutinename"><title>routine-designator</title><codeblock><b>{
 	<i>function-name</i> | <i>procedure-name</i>
 }</b></codeblock></section>
-<section id="rrefsqljgrseqsequencename"><title>sequenceName</title>
-<codeblock><b>[ <i><xref 
-href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
-href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i></b></codeblock>
-<p>If <i>schemaName</i> is not provided, the current schema is the default
-schema. If a qualified sequence name is specified, the schema name cannot
-begin with SYS.</p></section>
 <example id="grantexamples"><title>Examples</title><p>To grant the SELECT
 privilege on table <codeph>t</codeph> to the authorization IDs <codeph>maria</codeph> and <codeph>harry</codeph>,
 use the following syntax:<codeblock><b>GRANT SELECT ON TABLE t TO maria,harry</b> </codeblock></p><p>To
@@ -166,6 +177,10 @@ syntax:</p>
 <codeph>order_id</codeph> to the role <codeph>sales_role</codeph>, use the
 following syntax:</p>
 <codeblock><b>GRANT USAGE ON SEQUENCE order_id TO sales_role;</b></codeblock>
+<p>To grant the USAGE privilege on the user-defined type
+<codeph>price</codeph> to the role <codeph>finance_role</codeph>, use the
+following syntax:</p>
+<codeblock><b>GRANT USAGE ON TYPE price TO finance_role;</b></codeblock>
 </example>
 
 </refbody>

Modified: db/derby/docs/trunk/src/ref/rrefsqljrevoke.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljrevoke.dita?rev=935706&r1=935705&r2=935706&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljrevoke.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljrevoke.dita Mon Apr 19 18:58:48 2010
@@ -39,7 +39,7 @@ from a table.</li>
 <li>Create a trigger on a table.</li>
 <li>Update data in a table or in a subset of columns in a table.</li>
 <li>Run a specified routine (function or procedure).</li>
-<li>Use a sequence generator.</li>
+<li>Use a sequence generator or a user-defined type.</li>
 </ul></p><p>The
 <codeph><xref href="rrefpropersqlauth.dita#rrefpropersqlauth">derby.database.sqlAuthorization</xref></codeph>
 property must be set to <codeph>true</codeph> before you can use the GRANT
@@ -48,8 +48,8 @@ statement or the REVOKE statement. The
 enables SQL Authorization mode.</p><p>You can revoke privileges for an
 object if you are the owner of the object or the  <xref href="rrefattrib26867.dita#rrefattrib26867">database
 owner</xref>.</p><p>The syntax that you use for the REVOKE statement depends
-on whether you are revoking privileges to a table, a routine, or a sequence
-generator, or whether you are revoking a role.</p>
+on whether you are revoking privileges to a schema object or revoking a
+role.</p>
 <p>For more information on using the REVOKE statement, see "Using SQL standard
 authorization" in the <ph conref="../conrefs.dita#pub/citdevelop"></ph>.</p>
 </section>
@@ -66,14 +66,35 @@ clause specifies that the EXECUTE privil
 routine is used in a view, trigger, or constraint, and the privilege is being
 revoked from the owner of the view, trigger, or constraint.</p></section>
 <section id="revokesequencesyn"><title>Syntax for sequence generators</title>
-<codeblock><b>REVOKE USAGE ON SEQUENCE <i><xref href="rrefsqljrevoke.dita#rrefsqljrevoke/rrefsqljrevseqsequencename">sequenceName</xref></i> FROM <i><xref href="rrefsqljrevoke.dita#rrefsqljrevoke/revokegrantees">grantees</xref></i> RESTRICT</b></codeblock>
+<codeblock><b>REVOKE USAGE ON SEQUENCE [ <i><xref 
+href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i> FROM <i><xref href="rrefsqljrevoke.dita#rrefsqljrevoke/revokegrantees">grantees</xref></i> RESTRICT</b></codeblock>
 <p>In order to use a sequence generator, you must have the USAGE privilege on
 it. This privilege can be revoked from users and roles. Only RESTRICTed revokes
 are allowed. This means that the REVOKE statement cannot make a view, trigger,
 or constraint unusable by its owner. The USAGE privilege cannot be revoked from
 the schema owner. See
 <xref href="rrefsqljcreatesequence.dita#rrefsqljcreatesequence"></xref> for more
-information.</p></section>
+information.</p>
+<p>The sequence name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified sequence name is specified, the
+schema name cannot begin with SYS.</p></section>
+<section id="revoketypesyn"><title>Syntax for user-defined types</title>
+<codeblock><b>REVOKE USAGE ON TYPE  [ <i><xref 
+href="rrefschemaname.dita#rrefschemaname">schemaName</xref>.</i> ] <i><xref
+href="crefsqlj34834.dita#crefsqlj34834">SQL92Identifier</xref></i> FROM <i><xref href="rrefsqljrevoke.dita#rrefsqljrevoke/revokegrantees">grantees</xref></i> RESTRICT</b></codeblock>
+<p>In order to use a user-defined type, you must have the USAGE privilege on
+it. This privilege can be revoked from users and roles. Only RESTRICTed revokes
+are allowed. This means that the REVOKE statement cannot make a view, trigger,
+or constraint unusable by its owner. The USAGE privilege cannot be revoked from
+the schema owner. See
+<xref href="rrefsqljcreatetype.dita#rrefsqljcreatetype"></xref> for more
+information.</p>
+<p>The type name is composed of an optional <i>schemaName</i> and a
+<i>SQL92Identifier</i>. If a <i>schemaName</i> is not provided, the current
+schema is the default schema. If a qualified type name is specified, the schema
+name cannot begin with SYS.</p></section>
 <section><title>Syntax for roles</title>
 <codeblock><b>REVOKE <i><xref href="rrefrolename.dita#rrefrolename">roleName</xref></i> [ {, <i><xref
 href="rrefrolename.dita#rrefrolename">roleName</xref></i> }* ] FROM <i><xref 
@@ -245,6 +266,10 @@ following syntax:</p>
 <codeph>order_id</codeph> from the role <codeph>sales_role</codeph>, use the
 following syntax:</p>
 <codeblock><b>REVOKE USAGE ON SEQUENCE order_id FROM sales_role;</b></codeblock>
+<p>To revoke the USAGE privilege on the user-defined type
+<codeph>price</codeph> from the role <codeph>finance_role</codeph>, use the
+following syntax:</p>
+<codeblock><b>REVOKE USAGE ON TYPE price FROM finance_role;</b></codeblock>
 </example>
 </refbody>
 </reference>

Added: db/derby/docs/trunk/src/ref/rrefsqljudt.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljudt.dita?rev=935706&view=auto
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljudt.dita (added)
+++ db/derby/docs/trunk/src/ref/rrefsqljudt.dita Mon Apr 19 18:58:48 2010
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+ 
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<reference id="rrefsqljudt" xml:lang="en-us">
+<title>User-defined types</title>
+<prolog><metadata>
+<keywords><indexterm>user-defined types</indexterm>
+<indexterm>data types<indexterm>user-defined</indexterm></indexterm></keywords>
+</metadata></prolog>
+<refbody>
+<section><p><ph conref="../conrefs.dita#prod/productshortname"></ph> allows
+you to create user-defined types. A user-defined type is a serializable Java
+class whose instances are stored in columns. The class must implement the
+<i>java.io.Serializable</i> interface.</p>
+<p>For information on creating and removing types, see
+<xref href="rrefsqljcreatetype.dita#rrefsqljcreatetype"></xref> and
+<xref href="rrefsqljdroptype.dita#rrefsqljdroptype"></xref>. See
+<xref href="rrefsqljgrant.dita#rrefsqljgrant"></xref> and
+<xref href="rrefsqljrevoke.dita#rrefsqljrevoke"></xref> for information on usage
+privileges for types.</p>
+<p>For information on writing the Java classes that implement user-defined
+types, see "Programming user-defined types" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph>.</p>
+</section>
+</refbody>
+</reference>

Propchange: db/derby/docs/trunk/src/ref/rrefsqljudt.dita
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message