You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Wap Brunei <br...@hotmail.com> on 2001/12/31 07:38:21 UTC

autoincrement id

XMLResource document = (XMLResource) col.createResource("00001",
            "XMLResource");

is there any auto increment for id?




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


Re: autoincrement id

Posted by Tom Bradford <br...@dbxmlgroup.com>.
On Sunday, December 30, 2001, at 11:38 PM, Wap Brunei wrote:
> XMLResource document = (XMLResource) col.createResource("00001",
>            "XMLResource");
>
> is there any auto increment for id?

There is, but it's provided as an XMLObject called 'sequencer' that's 
registered with /db/system.  Basically, you associate a sequence with a 
common name, and call the next method to retrieve the next ID from the 
sequence.

--
Tom Bradford - http://www.tbradford.org
Chief Architect - The dbXML Group, L.L.C.
Developer - Apache Xindice (formerly dbXML)
Maintainer - jEdit-Syntax Java Editing Bean
Co-Author - O'Reilly's "Learning Xindice"