Difference between revisions of "EclipseLink/DesignDocs/350843"

From Eclipsepedia

Jump to: navigation, search
(Document History)
Line 14: Line 14:
| Gordon Yorke
| Gordon Yorke
| initial document creation
| initial document creation
| 11 April 2012
| James Sutherland
| feature completed

Latest revision as of 09:37, 10 September 2012

[edit] Design Specification: JPQL Generic Function support

ER 350843

[edit] Document History

Date Author Version Description & Notes
08 November 2011 Gordon Yorke initial document creation
11 April 2012 James Sutherland feature completed

[edit] Project overview

The SQL spec and many databases have SQL functions that are not covered by the JPA specification. With the latest JPA specification the ability to call generic SQL functions will be added to the JPQL syntax. This feature will cover adding this support.

[edit] Concepts

May functions like 'UTC_DATE' are supported by databases but not provided within JPQL. This feature will provide the functionality necessary to call a function by name using the keyword FUNCTION. The syntax takes the form:

function_invocation::= FUNCTION(function_name {, function_arg}*) function_arg ::=

                literal |
                state_field_path_expression |
                input_parameter |

The functionality was added to the Criteria API in JPA 2.0

   CriteriaBuilder.<T> Expression<T> function(String name, Class<T> type, Expression<?>... args);

[edit] Requirements

Implement support for the FUNCTION keyword.

[edit] Design Constraints

[edit] Design / Functionality

[edit] Testing

[edit] API

[edit] GUI

[edit] Config files

[edit] Documentation

[edit] Open Issues

This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.

Issue # Owner Description / Notes

[edit] Decisions

This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.

Issue # Description / Notes Decision

[edit] Future Considerations

During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.