You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by jt...@apache.org on 2006/08/12 02:00:08 UTC

svn commit: r430925 - in /db/derby/docs/trunk/src/ref: rrefexcept71493.dita rrefsqlj43125.dita

Author: jta
Date: Fri Aug 11 17:00:08 2006
New Revision: 430925

URL: http://svn.apache.org/viewvc?rev=430925&view=rev
Log:
DERBY-1551 Update the Reference Manual with instructions on how to call 
java stored procedures from triggers, a new feature added by DERBY-551.

Patch by Laura Stewart <sc...@gmail.com>.

Modified:
    db/derby/docs/trunk/src/ref/rrefexcept71493.dita
    db/derby/docs/trunk/src/ref/rrefsqlj43125.dita

Modified: db/derby/docs/trunk/src/ref/rrefexcept71493.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefexcept71493.dita?rev=430925&r1=430924&r2=430925&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefexcept71493.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefexcept71493.dita Fri Aug 11 17:00:08 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+ 
 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
  "../dtd/reference.dtd">
 <!-- 
@@ -19,6 +20,10 @@
 -->
 <reference id="rrefexcept71493" xml:lang="en-us">
 <title>SQLState and error message reference</title>
+<prolog><metadata>
+<keywords><indexterm>error messages</indexterm><indexterm>SQLState reference</indexterm>
+</keywords>
+</metadata></prolog>
 <refbody>
 <section><p>The following tables list <i>SQLStates</i> for exceptions. Exceptions
 that begin with an <i>X</i> are specific to <ph conref="refconrefs.dita#prod/productshortname"></ph>.
@@ -36,7 +41,8 @@
 <tbody>
 <row>
 <entry colname="col1">01001</entry>
-<entry colname="col2">An attempt to update or delete an already deleted row was made: No row was updated or deleted.</entry>
+<entry colname="col2">An attempt to update or delete an already deleted row
+was made: No row was updated or deleted.</entry>
 </row>
 <row>
 <entry colname="col1">01003       </entry>
@@ -1471,7 +1477,7 @@
 so the statement cannot be evaluated.  </entry>
 </row>
 <row>
-<entry colname="col1"> 42Y70</entry>
+<entry colname="col1">42Y70</entry>
 <entry colname="col2">The user specified an illegal join order. This could
 be caused by a join column from an inner table being passed as a parameter
 to an external virtual table.  </entry>
@@ -1487,7 +1493,7 @@
 that cannot be dropped using DROP STATEMENT. It is part of a trigger. </entry>
 </row>
 <row>
-<entry colname="col1"> 42Y83</entry>
+<entry colname="col1">42Y83</entry>
 <entry colname="col2">An untyped null is not permitted as an argument to aggregate &lt;<i>aggregateName</i>>.
  Please cast the null to a suitable type. </entry>
 </row>
@@ -1669,6 +1675,10 @@
 '&lt;<i>triggerName</i>>' triggers.  </entry>
 </row>
 <row>
+<entry colname="col1">42Z9D</entry>
+<entry colname="col2">Procedures that modify SQL data are not allowed in <i>before</i> triggers.</entry>
+</row>
+<row>
 <entry colname="col1">42Z9E</entry>
 <entry colname="col2">Constraint '&lt;<i>constraintName</i>>' is not a &lt;<i>value</i>>
 constraint.  </entry>
@@ -1981,8 +1991,8 @@
 </row>
 <row>
 <entry colname="col1">X0Y69</entry>
-<entry colname="col2">&lt;<i>value</i>> is not permitted because trigger &lt;<i>triggerName</i>>
-is active on &lt;<i>value</i>>.      </entry>
+<entry colname="col2">&lt;<i>value</i>> is not supported in trigger &lt;<i>triggerName</i>>
+.      </entry>
 </row>
 <row>
 <entry colname="col1">X0Y70   </entry>
@@ -3043,7 +3053,8 @@
 </row>
 <row>
 <entry colname="col1">XJ086</entry>
-<entry colname="col2">This method cannot be invoked while the cursor is not on the insert row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.</entry>
+<entry colname="col2">This method cannot be invoked while the cursor is not
+on the insert row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.</entry>
 </row>
 </tbody>
 </tgroup>

Modified: db/derby/docs/trunk/src/ref/rrefsqlj43125.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj43125.dita?rev=430925&r1=430924&r2=430925&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqlj43125.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqlj43125.dita Fri Aug 11 17:00:08 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+ 
 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
  "../dtd/reference.dtd">
 <!-- 
@@ -35,16 +36,16 @@
 event occurs on a specified table. A <i>database event</i> is a delete, insert,
 or update operation. For example, if you define a trigger for a delete on
 a particular table, the trigger's action occurs whenever someone deletes a
-row or rows from the table.</p> <p>Along with constraints, triggers can help
+row or rows from the table.</p><p>Along with constraints, triggers can help
 enforce data integrity rules with actions such as cascading deletes or updates.
 Triggers can also perform a variety of functions such as issuing alerts, updating
-other tables, sending e-mail, and other useful actions.</p> <p>You can define
+other tables, sending e-mail, and other useful actions.</p><p>You can define
 any number of triggers for a single table, including multiple triggers on
-the same table for the same event.</p> <p>You can create a trigger in any
-schema except one that starts with <i>SYS</i>. The trigger need not reside in the same schema as
-the table on which it is defined.</p> <p>If a qualified trigger name is specified,
-the schema name cannot begin with <i>SYS</i>.</p></section>
-<refsyn id="syn001"><title>Syntax</title> <codeblock><b>CREATE TRIGGER <i><xref
+the same table for the same event.</p><p>You can create a trigger in any schema
+except one that starts with <i>SYS</i>. The trigger need not reside in the
+same schema as the table on which it is defined.</p><p>If a qualified trigger
+name is specified, the schema name cannot begin with <i>SYS</i>.</p></section>
+<refsyn id="syn001"><title>Syntax</title><codeblock><b>CREATE TRIGGER <i><xref
 href="rreftriggername.dita#rreftriggername">TriggerName</xref></i>
 { AFTER | NO CASCADE BEFORE } 
 { INSERT | DELETE | UPDATE } [ OF <i>column-Name</i> [, <i><xref href="rrefcolumnname.dita#rrefcolumnname">column-Name</xref></i>]* ]
@@ -76,11 +77,11 @@
 The triggered-SQL-statement might need to refer to the new (post-change or
 "after") values. </p> <p><ph conref="refconrefs.dita#prod/productshortname"></ph> provides
 you with a number of ways to refer to data that is currently being changed
-by the database event that caused the trigger to fire. Changed data can be referred to in the triggered-SQL-statement using <i>transition
-variables</i> or <i>transition tables</i>. The referencing clause allows
-you to provide a correlation name or alias for these transition variables
-by specifying OLD/NEW AS <i>correlation-Name </i>.</p> <p>For example, if
-you add the following clause to the trigger definition:   <codeblock><b>REFERENCING OLD AS DELETEDROW</b></codeblock></p> <p>you
+by the database event that caused the trigger to fire. Changed data can be
+referred to in the triggered-SQL-statement using <i>transition variables</i> or <i>transition
+tables</i>. The referencing clause allows you to provide a correlation name
+or alias for these transition variables by specifying OLD/NEW AS <i>correlation-Name </i>.</p> <p>For
+example, if you add the following clause to the trigger definition:   <codeblock><b>REFERENCING OLD AS DELETEDROW</b></codeblock></p> <p>you
 can then refer to this correlation name in the triggered-SQL-statement:   <codeblock><b>DELETE FROM HotelAvailability WHERE hotel_id = DELETEDROW.hotel_id</b
 ></codeblock></p> <p>The OLD and NEW transition variables map to a <i>java.sql.ResultSet</i> with
 a single row.   <note>Only row triggers (see <xref href="rrefsqlj43125.dita#rrefsqlj43125/sqlj54276"></xref>)
@@ -127,10 +128,10 @@
 the trigger is defined.</li>
 <li>It must not commit or roll back the current transaction or change the
 isolation level.</li>
-<li>It must not execute a CALL statement.</li>
 <li>Before triggers cannot have INSERT, UPDATE or DELETE statements as their
 action.</li>
-</ul></p> <p>The triggered-SQL-statement can reference database objects other
+<li>Before triggers cannot call procedures that modify SQL data as their action.</li>
+</ul></p><p>The triggered-SQL-statement can reference database objects other
 than the table upon which the trigger is declared. If any of these database
 objects is dropped, the trigger is invalidated. If the trigger cannot be successfully
 recompiled upon the next execution, the invocation throws an exception and