Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 84181 invoked from network); 27 Jul 2005 22:28:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jul 2005 22:28:34 -0000 Received: (qmail 72843 invoked by uid 500); 27 Jul 2005 22:28:34 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 72598 invoked by uid 500); 27 Jul 2005 22:28:33 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 72583 invoked by uid 99); 27 Jul 2005 22:28:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2005 15:28:21 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 54519E0 for ; Thu, 28 Jul 2005 00:28:18 +0200 (CEST) Message-ID: <1946246573.1122503298344.JavaMail.jira@ajax.apache.org> Date: Thu, 28 Jul 2005 00:28:18 +0200 (CEST) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-475) Add a system function mechanism and table of functions, including a set of initial functions. Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 Assigned to: Daniel John Debrunner Add a mechanism for system functions to be easily added. Resolution of functions will check SYSFUN. 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.. 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