XQuery Function Documentation
http://exist-db.org/xquery/counter
java:org.exist.xquery.modules.counter.CounterModule
A module for persistent counters.
counter:create
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
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
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
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.