mirror of
https://github.com/typesense/typesense.git
synced 2025-05-17 20:22:32 +08:00
16 lines
248 B
C++
16 lines
248 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
/*
|
|
* Generates IDs for new records in sequential fashion.
|
|
* Uses RocksDB for persistence. (FIXME)
|
|
*/
|
|
class IdGenerator {
|
|
private:
|
|
int32_t id = 0;
|
|
public:
|
|
int32_t Next() {
|
|
return ++id;
|
|
}
|
|
}; |