A counter is a object that stores a single integer and can be incremented or decremented.
Example:
let counter = connection.counter("myCounter") await connection.update( counter.increment(3) ); let val = await counter.read();
the parent factory
Creates an operation to increment the counter. Negative numbers will decrement the value. Use Connection.update to send the update to the database.
Reads the current value of the counter
Generated using TypeDoc
A counter is a object that stores a single integer and can be incremented or decremented.
Example:
let counter = connection.counter("myCounter") await connection.update( counter.increment(3) ); let val = await counter.read();