A RESTful browser for eXist Function Modules


http://exist-db.org/xquery/counter
A module for persistent counters.

counter:create($counter-name as item()) xs:long?
Create a unique counter named $counter-name.
$counter-nameName of the counter.

Returns the value of the newly created counter.

counter:create($counter-name as item(), $init-value as xs:long) xs:long?
Create a unique counter named $counter-name and initialize it with value $init-value.
$counter-nameName of the counter.
$init-valueThe initial value of the counter.

Returns the value of the newly created counter.

counter:destroy($counter-name as item()) xs:boolean?
Destroy the counter named $counter-name.
$counter-nameName of the counter.

Returns boolean value true() if removal as successful, otherwise return value false().

counter:next-value($counter-name as item()) xs:long?
Increment the counter $counter-name and return its new value.
$counter-nameName of the counter.

Returns the new value of the specified counter, or -1 if the counter does not exist.
Return to list of all modules