Message:
The following issue has been re-assigned.
Assignee: David Channon (mailto:dch...@bi...)
Assigner: Gavin King (mailto:ga...@in...)
Date: Sun, 1 Jun 2003 7:59 PM
Comment:
Are you interested in this issue, David?
The work required would be:
* additions to Dialect and subclasses
* changes to SelectParser
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-117
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-117
Summary: Support for more SQL functions in SELECT
Type: Improvement
Status: Assigned
Priority: Major
Project: Hibernate2
Components:
core
Assignee: David Channon
Reporter: Gavin King
Created: Sun, 1 Jun 2003 7:58 PM
Updated: Sun, 1 Jun 2003 7:59 PM
Description:
Currently, Hibernate supports exactly five (hardcoded) SQL functions in the HQL SELECT clause. They are the aggregate functions COUNT(), AVG(), SUM(), MIN(), MAX()
A number of users would like to be able to specify an arbitrary SQL function in the SELECT. The problem here is that we need to know the return type of the function to be able to read it from the result set.
I propose that the Dialect classes include a collection of mappings from function names to Hibernate types (eg. CURRENT_DATE -> Hibernate.DATE). That way, we can support the most commonly used SQL functions, and others can be easily added by users providing extensions to the Dialect.
So, we would like to allow:
SELECT CURRENT_DATE(), TRUNC(foo.amount), ......
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|