db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Resolved: (DERBY-475) Add a system function mechanism and table of functions, including a set of initial functions.
Date Thu, 02 Feb 2006 19:56:03 GMT
     [ http://issues.apache.org/jira/browse/DERBY-475?page=all ]
     
Daniel John Debrunner resolved DERBY-475:
-----------------------------------------

    Resolution: Fixed

Complete set of functions added is:

ACOS, ASIN, ATAN, COS, SIN, TAN, PI
DEGREES, RADIANS, EXP, LN, LOG, LOG10, CEIL, CEILING, FLOOR

> Add a system function mechanism and table of  functions, including a set of initial functions.
> ----------------------------------------------------------------------------------------------
>
>          Key: DERBY-475
>          URL: http://issues.apache.org/jira/browse/DERBY-475
>      Project: Derby
>         Type: Improvement
>   Components: SQL
>     Reporter: Daniel John Debrunner
>     Assignee: Daniel John Debrunner
>      Fix For: 10.2.0.0

>
> Add a mechanism for system functions to be easily added. Resolution of functions will
check SYSFUN.<name> for a function call in SQL when the function is not qualified by
a schema. If the current schema does not have a function matching the name, then an additional
resolution is made using SYSFUN.<name>.
> Add a table driven mechanism for simple single argument functions (could be expanded
in the future).
> Add these functions
> /*
> ** SYSFUN functions
> *[0] = FUNCTION name
> *[1] = RETURNS type
> *[2] = Java class
> *[3] = method name
> *[4] = parameter type (single parameter)
> *
> */
> private static final String[][] SYSFUN_FUNCTIONS = {
> {"ACOS", "DOUBLE", "java.lang.Math", "acos", "DOUBLE"},
> {"ASIN", "DOUBLE", "java.lang.Math", "asin", "DOUBLE"},
> {"ATAN", "DOUBLE", "java.lang.Math", "atan", "DOUBLE"},
> {"COS", "DOUBLE", "java.lang.Math", "cos", "DOUBLE"},
> {"SIN", "DOUBLE", "java.lang.Math", "sin", "DOUBLE"},
> {"TAN", "DOUBLE", "java.lang.Math", "tan", "DOUBLE"},
> {"DEGREES", "DOUBLE", "java.lang.Math", "toDegrees", "DOUBLE"},
> {"RADIANS", "DOUBLE", "java.lang.Math", "toRadians", "DOUBLE"},
> {"LN", "DOUBLE", "java.lang.Math", "log", "DOUBLE"},
> {"EXP", "DOUBLE", "java.lang.Math", "exp", "DOUBLE"},
> {"CEIL", "DOUBLE", "java.lang.Math", "ceil", "DOUBLE"},
> {"CEILING", "DOUBLE", "java.lang.Math", "ceil", "DOUBLE"},
> {"FLOOR", "DOUBLE", "java.lang.Math", "floor", "DOUBLE"},
> };

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message