Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 14EBB9878 for ; Wed, 13 Jun 2012 23:13:43 +0000 (UTC) Received: (qmail 23766 invoked by uid 500); 13 Jun 2012 23:13:42 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 23737 invoked by uid 500); 13 Jun 2012 23:13:42 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 23729 invoked by uid 99); 13 Jun 2012 23:13:42 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2012 23:13:42 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 9C3A21404B9 for ; Wed, 13 Jun 2012 23:13:42 +0000 (UTC) Date: Wed, 13 Jun 2012 23:13:42 +0000 (UTC) From: "Thomas Fox (JIRA)" To: torque-dev@db.apache.org Message-ID: <280375479.13937.1339629222641.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1105975727.2690.1323723210625.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (TORQUE-177) SQLFunction interface should extend Column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TORQUE-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Fox resolved TORQUE-177. ------------------------------- Resolution: Fixed Fix Version/s: 4.0 Assignee: Thomas Fox > SQLFunction interface should extend Column > ------------------------------------------ > > Key: TORQUE-177 > URL: https://issues.apache.org/jira/browse/TORQUE-177 > Project: Torque > Issue Type: Improvement > Components: Runtime > Affects Versions: 4.0 > Reporter: CG Monroe > Assignee: Thomas Fox > Fix For: 4.0 > > > Support for DBA specific SQL Functions / Expression was added right after 3.3 was released. See org.apache.torque.utils.SummaryHelper and org.apache.torque.utils.functions package. This allows for SQL functions to be specified in queries in an SQL version independent way. E.g. string concatenation can be different on different servers. > Since SQLFunctions are created with all the same info that a Column object needs, it does not make sense to have to do: >
> hoursMax = FunctionFactory.max(TimeCard.HOURS);
> Column col = new ColumnImpl(
>   null,
>   TimeCard.HOURS.getTableName(),
>   TimeCard.HOURS.getColumnName(),
>   maxHours.toSQL()
> );
> criteria.addAsColumn(col);
> 
> Since SQLFunctions contain the needed info for columns, the SQLFunction interface extend Column and supply the required column info via the Column functions. This means that SQLFunctions could be just added via: > criterial.addAsColumn(FunctionFactory.max(TimeCard.HOURS); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org