XQuery Function Documentation
http://exist-db.org/xquery/counter
java:org.exist.xquery.modules.counter.CounterModule
A module for persistent counters.
counter:create #1
counter:create ($counter-name as item()) as xs:long
Create a unique counter named $counter-name.
- Parameters:
$counter-name Name of the counter. - Returns:
- xs:long? : the value of the newly created counter.
counter:create #2
counter:create ($counter-name as item(), $init-value as xs:long) as xs:long
Create a unique counter named $counter-name and initialize it with value $init-value.
- Parameters:
$counter-name Name of the counter. $init-value The initial value of the counter. - Returns:
- xs:long? : the value of the newly created counter.
counter:destroy #1
counter:destroy ($counter-name as item()) as xs:boolean
Destroy the counter named $counter-name.
- Parameters:
$counter-name Name of the counter. - Returns:
- xs:boolean? : boolean value true() if removal as successful, otherwise return value false().
counter:next-value #1
counter:next-value ($counter-name as item()) as xs:long
Increment the counter $counter-name and return its new value.
- Parameters:
$counter-name Name of the counter. - Returns:
- xs:long? : the new value of the specified counter, or -1 if the counter does not exist.