[teiid-commits] teiid SVN: r1920 - trunk/documentation/reference/src/main/docbook/en-US/content.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Fri Mar 5 12:50:26 EST 2010


Author: shawkins
Date: 2010-03-05 12:50:26 -0500 (Fri, 05 Mar 2010)
New Revision: 1920

Modified:
   trunk/documentation/reference/src/main/docbook/en-US/content/datatypes.xml
   trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml
Log:
TEIID-833 committing JCA merge

Modified: trunk/documentation/reference/src/main/docbook/en-US/content/datatypes.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/datatypes.xml	2010-03-05 16:17:48 UTC (rev 1919)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/datatypes.xml	2010-03-05 17:50:26 UTC (rev 1920)
@@ -28,9 +28,9 @@
         </thead>
         <tbody>
           <row>
-            <entry>string</entry>
+            <entry>string or varchar</entry>
             <entry>variable length character string with a
-              maximum length of 4000</entry>
+              maximum length of 4000.  Note that the length cannot be explicitly set with the type literal, e.g. varchar(100).</entry>
             <entry>java.lang.String</entry>
             <entry>VARCHAR</entry>
             <entry>VARCHAR</entry>
@@ -51,14 +51,14 @@
             <entry>SMALLINT</entry>
           </row>
           <row>
-            <entry>byte</entry>
+            <entry>byte or tinyint</entry>
             <entry>numeric, integral type, signed 8-bit</entry>
             <entry>java.lang.Byte</entry>
             <entry>TINYINT</entry>
             <entry>SMALLINT</entry>
           </row>
           <row>
-            <entry>short</entry>
+            <entry>short or smallint</entry>
             <entry>numeric, integral type, signed 16-bit</entry>
             <entry>java.lang.Short</entry>
             <entry>SMALLINT</entry>
@@ -72,7 +72,7 @@
             <entry>INTEGER</entry>
           </row>
           <row>
-            <entry>long</entry>
+            <entry>long or bigint</entry>
             <entry>numeric, integral type, signed 64-bit</entry>
             <entry>java.lang.Long</entry>
             <entry>BIGINT</entry>
@@ -87,7 +87,7 @@
             <entry>NUMERIC</entry>
           </row>
           <row>
-            <entry>float</entry>
+            <entry>float or real</entry>
             <entry>numeric, floating point type, 32-bit IEEE 754
               floating-point numbers</entry>
             <entry>java.lang.Float</entry>
@@ -103,9 +103,9 @@
             <entry>DOUBLE</entry>
           </row>
           <row>
-            <entry>bigdecimal</entry>
+            <entry>bigdecimal or decimal</entry>
             <entry>numeric, floating point type, arbitrary
-              precision of up to 1000 digits</entry>
+              precision of up to 1000 digits.  Note that the precision and scale cannot be explicitly set with the type literal, e.g. decimal(38, 2).</entry>
             <entry>java.math.BigDecimal</entry>
             <entry>NUMERIC</entry>
             <entry>NUMERIC</entry>

Modified: trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml	2010-03-05 16:17:48 UTC (rev 1919)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/procedures.xml	2010-03-05 17:50:26 UTC (rev 1920)
@@ -49,7 +49,7 @@
           </para>
         </listitem>
         <listitem>
-          <para>The "USING" clause allows the dynamic SQL string to contain variable references that are bound at runtime to specified values. This allows for some independence of the SQL string from the surrounding procedure variable names and input names. In the dynamic command "USING" clause, each variable is specified by short name only. However in the dynamic SQL the "USING" variable must be fully qualified to "USING.". The "USING" clause is only for values that will be used in the dynamic SQL as legal expressions. It is not possible to use the "USING" clause to replace table names, keywords, etc. This makes using symbols equivalent in power to normal bind (?) expressions in prepared statements. The "USING" clause helps reduce the amount of string manipulation needed. If a reference is made to a USING symbol in the SQL string that is not bound to a value in the "USING" clause, an exception will occur.
+          <para>The "USING" clause allows the dynamic SQL string to contain variable references that are bound at runtime to specified values. This allows for some independence of the SQL string from the surrounding procedure variable names and input names. In the dynamic command "USING" clause, each variable is specified by short name only. However in the dynamic SQL the "USING" variable must be fully qualified to "UVAR.". The "USING" clause is only for values that will be used in the dynamic SQL as legal expressions. It is not possible to use the "USING" clause to replace table names, keywords, etc. This makes using symbols equivalent in power to normal bind (?) expressions in prepared statements. The "USING" clause helps reduce the amount of string manipulation needed. If a reference is made to a USING symbol in the SQL string that is not bound to a value in the "USING" clause, an exception will occur.
           </para>
         </listitem>
         <listitem>
@@ -63,7 +63,7 @@
 /* Typically complex criteria would be formed based upon inputs to the procedure. 
  In this simple example the criteria is references the using clause to isolate 
  the SQL string from referencing a value from the procedure directly */ 
-DECLARE string criteria = 'Customer.Accounts.Last = USING.LastName'; 
+DECLARE string criteria = 'Customer.Accounts.Last = DVARS.LastName'; 
 /* Now we create the desired SQL string */ 
 DECLARE string sql_string = 'SELECT ID, First || ‘‘ ‘‘ || Last AS Name, Birthdate FROM Customer.Accounts WHERE ' || criteria; 
 /* The execution of the SQL string will create the #temp table with the columns (ID, Name, Birthdate). 
@@ -81,17 +81,17 @@
         <programlisting>...
 DECLARE string crit = null; 
 IF (AccountAccess.GetAccounts.ID IS NOT NULL) 
- crit = ‘(Customer.Accounts.ID = using.ID)’; 
+ crit = ‘(Customer.Accounts.ID = DVARS.ID)’; 
 ELSE IF (AccountAccess.GetAccounts.LastName IS NOT NULL) 
 BEGIN 
  IF (AccountAccess.GetAccounts.LastName == ‘%’) 
    ERROR "Last name cannot be %"; 
  ELSE IF (LOCATE(‘%’, AccountAccess.GetAccounts.LastName) &lt; 0) 
-   crit = ‘(Customer.Accounts.Last = using.LastName)’; 
+   crit = ‘(Customer.Accounts.Last = DVARS.LastName)’; 
  ELSE 
-   crit = ‘(Customer.Accounts.Last LIKE using.LastName)’; 
+   crit = ‘(Customer.Accounts.Last LIKE DVARS.LastName)’; 
  IF (AccountAccess.GetAccounts.bday IS NOT NULL) 
-   crit = ‘(‘ || crit || ‘ and (Customer.Accounts.Birthdate = using.BirthDay))’; 
+   crit = ‘(‘ || crit || ‘ and (Customer.Accounts.Birthdate = DVARS.BirthDay))’; 
 END 
 ELSE 
  ERROR "ID or LastName must be specified."; 
@@ -118,7 +118,7 @@
             <title>Example Dangerous NULL handling
             </title>
             <programlisting>...
-criteria = ‘(‘ || criteria || ‘ and (Customer.Accounts.Birthdate = using.BirthDay))’;</programlisting>
+criteria = ‘(‘ || criteria || ‘ and (Customer.Accounts.Birthdate = DVARS.BirthDay))’;</programlisting>
           </example>
           <para>The preferred approach is for the user to ensure the criteria is not NULL prior its usage. If this is not possible, a good approach is to specify a default as shown in the following example.
           </para>
@@ -126,7 +126,7 @@
             <title>Example NULL handling
             </title>
             <programlisting>...
-criteria = ‘(‘ || nvl(criteria, ‘(1 = 1)’) || ‘ and (Customer.Accounts.Birthdate = using.BirthDay))’;</programlisting>
+criteria = ‘(‘ || nvl(criteria, ‘(1 = 1)’) || ‘ and (Customer.Accounts.Birthdate = DVARS.BirthDay))’;</programlisting>
           </example>
         </listitem>
         <listitem>
@@ -437,9 +437,12 @@
       <para>You can use a number of special variables when defining your update procedure.</para>
       <sect3 id="input_variables">
         <title>INPUT Variables</title>
-        <para>Every attribute in the view whose UPDATE and INSERT transformations you are defining has an equivalent variable named INPUT.&lt;column_name&gt;</para>
+        <para>Every attribute in the view whose UPDATE and INSERT transformations you are defining has an equivalent variable named INPUTS.&lt;column_name&gt;</para>
         <para>When an INSERT or an UPDATE command is executed against the view, these variables are initialized to the values in the INSERT VALUES clause or the UPDATE SET clause respectively.</para>
         <para>In an UPDATE procedure, the default value of these variables, if they are not set by the command, is null. In an INSERT procedure, the default value of these variables is the default value of the virtual table attributes, based on their defined types.  See <link linkend="changing_variables">CHANGING Variables</link> for distinguishing defaults from passed values.</para>
+      	<warning>
+      		<para>In prior release of Teiid INPUT was also accepted as the quailifer for an input variable.  As of Teidd 7, INPUT is a reserved word, so INPUTS is the preferred qualifier.</para>
+      	</warning>
       </sect3>
       <sect3 id="changing_variables">
         <title>CHANGING Variables</title>
@@ -579,7 +582,7 @@
                   <entry>Translates any user criteria using the default mappings.</entry>
                 </row>
                 <row>
-                  <entry>TRANSLATE CRITERIA WITH (column1 = 'A', column2 = INPUT.column2 + 2)</entry>
+                  <entry>TRANSLATE CRITERIA WITH (column1 = 'A', column2 = INPUTS.column2 + 2)</entry>
                   <entry>Translates any criteria with some additional mappings: column1 is always mapped to 'A' and column2 is mapped to the incoming column2 value + 2.</entry>
                 </row>
                 <row>



More information about the teiid-commits mailing list