Parameters for db.GetSequence

Hello all. I am wondering what DB.GetSequence() should be initialized to. Specifically the ‘key’ parameter. Is that something I need to store in a file between sessions?

Badger is a key-value store. A sequence is a fresh number generator (roughly speaking). So if you want to generate a sequence given a key in the key value store then you can use .GetSequence. The key is the key of a value.

@naman can I get a factcheck?

1 Like

Ah ok, that makes sense. I was misunderstanding what the sequence is for.

1 Like