From: Marcus <StM...@gm...> - 2008-03-06 17:29:17
|
Hi, sorry for asking, but i don't understand the clue at the moment!? How could that be used as a primary key (autoincremeted id) just like in traditional databases? And cause you were asking, my abilities in java-programming are not soooo well and at the moment the time is missing, but perhaps in april i may have some time to try to help a bit, if none other had the chance to implement this feature till then. But i'm sure there are many othery more qualified than me :-) Regards, Marcus ----- Original Message ----- From: "Wolfgang" <wol...@gm...> To: "Adam Retter" <ada...@de...> Cc: "Marcus" <StM...@gm...>; <Exi...@li...> Sent: Thursday, March 06, 2008 6:15 PM Subject: Re: [Exist-open] Autoincrement ID when saving a new doc? >> What did you have in mind, some sort of trigger? > > No, I rather thought about a generic solution not limited to generating > document names. We could provide three XQuery functions: > > create-counter($name, $initialValue): creates a global counter identified > by its name. I guess this counter should be persistant. > > destroy-counter($name): removes the counter. > > increment-counter($name) as xs:int: retrieve the next value from the > counter. > > Wolfgang |