db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5488) Add remaining JDBC 4.1 bits which did not appear in the Java 7 javadoc.
Date Thu, 10 Nov 2011 17:44:51 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick Hillegas updated DERBY-5488:
---------------------------------

    Attachment: derby-5488-05-ad-limitOffset.diff

Attaching derby-5488-05-ad-limitOffset.diff. This patch adds the JDBC LIMIT/OFFSET escape
syntax, mapping it onto Derby's existing implementation of SQL Standard OFFSET/FETCH NEXT
syntax. Ad-hoc experiments suggest that the patch works. The OffsetFetchNextTest passes cleanly.
I will run full regression tests. Follow-on patches for tests will be needed.

Most of the files which were touched were changed because of a difference between SQL Standard
and JDBC behaviors: In the SQL Standard, the FETCH FIRST clause only lets you specify a positive
number of rows to be returned--a value of 0 is supposed to raise an exception. In contrast,
the JDBC escape syntax allows a LIMIT value of 0. That special value means that all rows should
be returned from the OFFSET onwards. Many files had to be touched in order to propagate whether
we want SQL Standard or JDBC behavior.

Changes fall into 3 categories:

1) Parse/bind-time changes. Parser references to the existing OFFSET and FETCH NEXT productions
were replaced with a call to a new production which handles both the SQL Standard and the
JDBC syntax. In addition, the constructors for various ResultSet nodes were changed in order
to propagate the distinction between SQL Standard and JDBC behaviors.

2) Code generator changes. Only one code generation method had to be touched.

3) Run-time changes. A couple changes were necessary in order to propagate the distinction
between SQL Standard and JDBC behaviors.

Touches the following files:

--------------

M       java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

Parser changes to support the new JDBC escape syntax. 

--------------

M       java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java
M       java/engine/org/apache/derby/impl/sql/compile/FromSubquery.java
M       java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.java
M       java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
M       java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
M       java/engine/org/apache/derby/impl/sql/compile/RowCountNode.java
M       java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java
M       java/engine/org/apache/derby/impl/sql/compile/CursorNode.java
M       java/engine/org/apache/derby/impl/sql/compile/UnionNode.java
M       java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java
M       java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
M       java/engine/org/apache/derby/impl/sql/compile/InsertNode.java
M       java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java
M       java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java
M       java/engine/org/apache/derby/impl/sql/compile/IntersectOrExceptNode.java

Parse/bind-time changes to propagate the distinction between SQL Standard and JDBC behaviors.

In addition, the generate() method of RowCountNode was touched for the same reason.

--------------


M       java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java
M       java/engine/org/apache/derby/impl/sql/execute/RowCountResultSet.java
M       java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java
M       java/engine/org/apache/derby/loc/messages.xml

Run-time changes to handle the distinction between SQL Standard and JDBC behaviors.

                
> Add remaining JDBC 4.1 bits which did not appear in the Java 7 javadoc.
> -----------------------------------------------------------------------
>
>                 Key: DERBY-5488
>                 URL: https://issues.apache.org/jira/browse/DERBY-5488
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC, SQL
>    Affects Versions: 10.9.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: JDBC_4.1_Supplement.html, derby-5488-01-aa-objectMappingAndConversion.diff,
derby-5488-02-aa-fixBigInteger.diff, derby-5488-03-ac-moveDecimalSetterGetterAndTest.diff,
derby-5488-04-aa-fixBigIntegerDecimal.diff, derby-5488-05-ad-limitOffset.diff, z.java
>
>
> In addition to the JDBC 4.1 bits which were visible in the Java 7 javadoc, a couple other
items appear in the JDBC 4.1 Maintenance Review spec. This spec has been published on the
JCP website at http://download.oracle.com/otndocs/jcp/jdbc-4_1-mrel-eval-spec/index.html.
I will attach a functional spec for the remaining bits.

--
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

        

Mime
View raw message