Author: jta Date: Thu May 5 08:45:52 2005 New Revision: 168346 URL: http://svn.apache.org/viewcvs?rev=168346&view=rev Log: Committed Jeff Levitt's patch for updatable ResultSets submitted to derby-dev 5/4/05
Modified: incubator/derby/docs/trunk/src/ref/rrefcolumnname.dita incubator/derby/docs/trunk/src/ref/rrefcorrelationname.dita incubator/derby/docs/trunk/src/ref/rrefjdbc77156.dita Modified: incubator/derby/docs/trunk/src/ref/rrefcolumnname.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefcolumnname.dita?rev=168346&r1=168345&r2=168346&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/ref/rrefcolumnname.dita (original) +++ incubator/derby/docs/trunk/src/ref/rrefcolumnname.dita Thu May 5 08:45:52 2005 @@ -24,21 +24,27 @@ a column by qualifying it with a <i>table-Name</i> or <i>correlation-Name</i>. </p></section> <section><p>In some situations, you cannot qualify a <i>column-Name</i> with a <i>table-Name</i> or a <i>correlation-Name,</i> but must use a <i><xref -href="rrefsimplecolumnname.dita#rrefsimplecolumnname"></xref></i> instead. Those -situations are:</p></section> +href="rrefsimplecolumnname.dita#rrefsimplecolumnname"></xref></i> instead. +Those situations are:</p></section> <section> <ul> <li>creating a table (<xref href="rrefsqlj24513.dita#rrefsqlj24513"></xref>)</li> <li>specifying updatable columns in a cursor</li> <li>in a column's correlation name in a SELECT expression (see <i><xref href="rrefselectexpression.dita#rrefselectexpression"></xref></i>)</li> <li>in a column's correlation name in a <i>TableExpression</i> (see <i><xref href="rreftableexpression.dita#rreftableexpression">TableExpression</xref></i>)</li> -</ul></section> +</ul><p>You cannot use correlation-Names for updatable columns; using correlation-Names +in this way will cause an SQL exception. For example:<codeblock>SELECT c11 AS col1, c12 AS col2, c13 FROM t1 FOR UPDATE of c11,c13 +</codeblock>In this example, the correlation-Name <codeph>col1 FOR c11</codeph> is +not permitted because <codeph>c11</codeph> is listed in the FOR UPDATE list +of columns. You can use the correlation-Name <codeph>FOR c12</codeph> because +it is not in the FOR UPDATE list.</p></section> <section><title>Syntax</title> <codeblock><b>[ { <i><xref href="rreftablename.dita#rreftablename"></xref></i> | <i><xref -href="rrefcorrelationname.dita#rrefcorrelationname"></xref></i> } . ] <i><xref href="crefsqlj34834.dita#crefsqlj34834"></xref></i></b></codeblock></section> -<section><title>Example</title> <codeblock><b><ph>-- C.Country is a column-Name qualified with a +href="rrefcorrelationname.dita#rrefcorrelationname"></xref></i> } . ] <i><xref +href="crefsqlj34834.dita#crefsqlj34834"></xref></i></b></codeblock></section> +<section><title>Example</title> <codeblock><ph>-- C.Country is a column-Name qualified with a -- <xref href="rrefcorrelationname.dita#rrefcorrelationname"></xref>.</ph> SELECT C.Country -FROM APP.Countries C</b></codeblock></section> +FROM APP.Countries C</codeblock></section> </refbody> </reference> -<?Pub *0000001669?> +<?Pub *0000002843?> Modified: incubator/derby/docs/trunk/src/ref/rrefcorrelationname.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefcorrelationname.dita?rev=168346&r1=168345&r2=168346&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/ref/rrefcorrelationname.dita (original) +++ incubator/derby/docs/trunk/src/ref/rrefcorrelationname.dita Thu May 5 08:45:52 2005 @@ -19,14 +19,20 @@ "../dtd/reference.dtd"> <reference id="rrefcorrelationname" xml:lang="en-us"> <title>correlation-Name</title> -<refbody><?Pub Caret1?> +<refbody> <section><p>A <i>correlation-Name</i> is given to a table expression in a FROM clause as a new name or alias for that table. You do not qualify a <i>correlation-Name</i> with -a <i>schema-Name</i>.</p></section> +a <i>schema-Name</i>.</p><p>You cannot use correlation-Names for updatable +columns; using correlation-Names in this way will cause an SQL exception. +For example:<codeblock>SELECT c11 AS col1, c12 AS col2, c13 FROM t1 FOR UPDATE of c11,c13 +</codeblock>In this example, the correlation-Name <codeph>col1 FOR c11</codeph> is +not permitted because <codeph>c11</codeph> is listed in the FOR UPDATE list +of columns. You can use the correlation-Name <codeph>FOR c12</codeph> because +it is not in the FOR UPDATE list.</p></section> <section><title>Syntax</title> <codeblock><b><i><xref href="crefsqlj34834.dita#crefsqlj34834"></xref></i></b></codeblock></section> -<section><title>Example</title> <codeblock><b><ph>-- C is a correlation-Name</ph> -SELECT C.NAME -FROM SAMP.STAFF C</b></codeblock></section> +<section><title>Example</title> <codeblock><ph>-- C is a correlation-Name +</ph>SELECT C.NAME +FROM SAMP.STAFF C</codeblock></section> </refbody> </reference> -<?Pub *0000000792?> +<?Pub *0000001921?> Modified: incubator/derby/docs/trunk/src/ref/rrefjdbc77156.dita URL: http://svn.apache.org/viewcvs/incubator/derby/docs/trunk/src/ref/rrefjdbc77156.dita?rev=168346&r1=168345&r2=168346&view=diff ============================================================================== --- incubator/derby/docs/trunk/src/ref/rrefjdbc77156.dita (original) +++ incubator/derby/docs/trunk/src/ref/rrefjdbc77156.dita Thu May 5 08:45:52 2005 @@ -50,13 +50,13 @@ <row> <entry colname="1"><i>void</i></entry> <entry colname="2"><i>deleteRow()</i></entry> -<entry colname="3">After the row is deleted, the ResultSet object will be +<entry colname="3">After the row is updated, the ResultSet object will be positioned before the next row. Before issuing any methods other than close on the ResultSet object, the program will need to reposition the ResultSet object by using the <i>next()</i> method.</entry> </row> <row> -<entry colname="1"><i>boolan</i></entry> +<entry colname="1"><i>boolean</i></entry> <entry colname="2"><i>first()</i></entry> <entry colname="3"></entry> </row> @@ -148,6 +148,14 @@ <entry colname="2"><i>setFetchSize(int rows)</i></entry> <entry colname="3">A fetch size of 1 is the only size supported.</entry> </row> +<row> +<entry colname="1"><i>void</i></entry> +<entry colname="2"><i>updateRow()</i></entry> +<entry colname="3">After the row is deleted, the ResultSet object will be +positioned before the next row. Before issuing any methods other than close +on the ResultSet object, the program will need to reposition the ResultSet +object by using the <i>next()</i> method.</entry> +</row> </tbody> </tgroup> </table> @@ -158,7 +166,7 @@ called and there are no more rows. <i>afterLast()</i> does not close the <i>ResultSet</i>, for example.<p>JDBC is not required to have auto-commit off when using updatable ResultSets.</p><p>At this moment, <ph conref="refconrefs.dita#prod/productshortname"></ph> does -not support the insertRow() or updateRow() methods for updatable <i>ResultSets</i>.</p><?Pub Caret1?></note></section> +not support the insertRow() method for updatable <i>ResultSets</i>.</p></note></section> </refbody> </reference> -<?Pub *0000005256?> +<?Pub *0000006232?>