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 my...@apache.org on 2015/01/22 23:08:51 UTC

svn commit: r1654084 - /db/derby/docs/trunk/src/ref/rrefsqljexternalname.dita

Author: myrnavl
Date: Thu Jan 22 22:08:51 2015
New Revision: 1654084

URL: http://svn.apache.org/r1654084
Log:
DERBY-3005; Document possibility to specify method signature in EXTERNAL NAME when creating a procedure/function
   Updating the syntax and examples for the external name clause to reflect support for signatures in create procedure and create function statements.

Modified:
    db/derby/docs/trunk/src/ref/rrefsqljexternalname.dita

Modified: db/derby/docs/trunk/src/ref/rrefsqljexternalname.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljexternalname.dita?rev=1654084&r1=1654083&r2=1654084&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljexternalname.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljexternalname.dita Thu Jan 22 22:08:51 2015
@@ -39,7 +39,8 @@ a CREATE AGGREGATE or CREATE TYPE statem
 <p>The <i>singleQuotedString</i> cannot have any extraneous spaces.</p>
 <p>The method name specified in the CREATE FUNCTION or CREATE PROCEDURE
 statement normally takes the following form:</p>
-<codeblock><b>'<i>class_name</i>.<i>method_name</i>'</b></codeblock>
+<codeblock><b>'<i>class_name</i>.<i>method_name</i>[(<i>parameterTypes</i>)]'</b></codeblock>
+<p>The optional <i>parameterTypes</i> specification is needed when the Java signature determined from the SQL declaration is ambiguous.</p>
 <p>If the class is a static nested class, or if the method is in a static nested
 class, use a dollar sign ($) as a separator between the outer and static class.
 For example, suppose you have the following class and method definition:</p>
@@ -64,6 +65,14 @@ RETURNS DOUBLE
 PARAMETER STYLE JAVA
 NO SQL LANGUAGE JAVA
 EXTERNAL NAME 'TestFuncs$MyMath.pow'</b></codeblock>
+<codeblock><b>-- create a function to round a Double to a specified number of decimal places
+CREATE FUNCTION DoubleFormat (value FLOAT, places INTEGER)
+RETURNS FLOAT
+PARAMETER STYLE JAVA
+LANGUAGE JAVA
+EXTERNAL NAME
+'utils.Utils.Double(java.lang.Float,java.lang.Integer)'
+</b></codeblock>
 </example>
 </refbody>
 </reference>