ScalienDB is a key value store, so unique IDs have to be maintained in a separate key in a seperate table. For example:
people => 2500
ScalienDB has a special ADD
command which parses the value as a number and increments it by a user specified value. The Index class wraps this functionality, and increments the number by a user-defined gran
(default 1000). This way, the server is contacted only every 1000th time the sequence is incremented, which is an important optimization since sending and waiting for commands to execute on the server is slow.
Note that if the client quits before using up all the sequence values retrieved by the last ADD
command, those will not be passed out, and there will be a hole in the sequence.
Use Reset() to reset the sequence to 1. This sets:
key => 1