cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: General DB question
Date Tue, 13 Mar 2001 20:53:07 GMT
At 03:38  13/3/01 -0500, Berin Loritsch wrote:
>I want to add one more mode to the keys, so that we can
>automatically specify a Sequence object.  In Oracle, the
>syntax works like this:
>
>INSERT INTO myTable VALUES (
>    MySequence.NEXTVAL,
>    "new thing"
>);
>
>Or if you have multiple tables that work together, it
>would be like this:
>
>INSERT INTO myTable VALUES (
>    MySequence.NEXTVAL,
>    "new thing"
>);
>
>INSERT INTO myOtherTable VALUES (
>    MySequence.CURRVAL,
>    "associated thing"
>);
>
>My question is, "Is this Oracle specific, or generic
>enough to fit in the DatabaseAddAction object?".
>
>Right now, I am working with views and triggers to
>do this--but if I can bypass that I will.

Unfortunately this is vendor specific. Some vendors do it via ommission,
others explicitly and others require users do it for themselves. There are
a few frameworks setup to handle this. The best I have found was turbine -
unfortunately it is entrenched in turbines framework. If you don't need
X-DB functionality then it may be good to either encourage turbine to
refactor it into commons project when/if it becomes viable or else try to
minimize binding to turbine.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message