db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-712) Support for sequences
Date Tue, 12 Jan 2010 00:04:54 GMT

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

Rick Hillegas updated DERBY-712:

    Attachment: derby-712-04-aa-dblook.diff

Attaching derby-712-04-aa-dblook.diff. This adds dblook support for sequences. This includes
generating the privilege ddl. The regression tests passed cleanly for me. Committed at subversion
revision 898123.

Touches the following files:

M      java/tools/org/apache/derby/tools/dblook.java
A      java/tools/org/apache/derby/impl/tools/dblook/DB_Sequence.java
M      java/tools/org/apache/derby/impl/tools/dblook/DB_Alias.java

Logic to recreate the CREATE SEQUENCE statements.

M      java/tools/org/apache/derby/impl/tools/dblook/DB_GrantRevoke.java

Logic to recreate the GRANT USAGE ON SEQUENCE statements.

M      java/tools/org/apache/derby/loc/toolsmessages.properties

Banners for the sequences ddl and privileges.

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

In reconstructing generic CREATE SEQUENCE ddl, I needed to generate the optional clauses of
that statement. I added parser support for the optional clauses.  However, at bind-time, we
raise an exception for anything but the vanilla CREATE SEQUENCE statement. While I was in
there, I amended the creation of the sequence tuple so that the default start value is the
smallest (most negative) integer. This is what the spec says should be done.

M      java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_makeDB_2.sql
M      java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out
M      java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out

Heartbeat test for recreating sequence ddl.

> Support for sequences
> ---------------------
>                 Key: DERBY-712
>                 URL: https://issues.apache.org/jira/browse/DERBY-712
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>         Environment: feature request 
>            Reporter: Tony Dahbura
>            Assignee: Suran Jayathilaka
>             Fix For:
>         Attachments: altertable.diff, catalogs_a.patch, catalogs_b.patch, catalogs_c.patch,
catalogs_d.patch, catalogs_e.patch, catalogs_f.patch, catalogs_f_2.patch, catalogs_g.diff,
catalogs_h.diff, create_drop_sequence_a.patch, create_drop_sequence_b.patch, create_drop_sequence_c.patch,
create_drop_sequence_d.patch, create_sequence_a.patch, derby-712-02-aa-privilegeNodeCleanup.diff,
derby-712-03-aa-usagePrivilege.diff, derby-712-03-ac-usagePrivilege.diff, derby-712-04-aa-dblook.diff,
SequenceGenerator.html, sequences_next_value_a.patch
> Would like to see support added for sequences.  This would permit a select against the
sequence to always obtain a ever increasing/decreasing value.  The identity column works fine
but there are times for applications where the application needs to obtain the sequence number
and use it prior to the database write.  Subsequent calls to the table/column would result
in a new number on each call.
> SQL such as the following:
> SELECT NEXT VALUE FOR sequence_name FROM sometable ; would result in a next value.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message