minetest-mapper-cpp/db-redis.h
Rogier 7c2cf3efa9 Cleanup sqlite3 database code a bit
As tests using --sqlite-cacheworldrow showed a consistently
lower performance than without, this option was effectively
disabled. It is still recognised for compatibility, but
it may be removed some time in the future.
2015-03-10 12:01:55 +01:00

24 lines
508 B
C++

#ifndef DB_REDIS_HEADER
#define DB_REDIS_HEADER
#include "db.h"
#include <hiredis.h>
class DBRedis : public DB {
public:
DBRedis(const std::string &mapdir);
virtual int getBlocksQueriedCount(void);
virtual int getBlocksReadCount(void);
virtual const BlockPosList &getBlockPos();
virtual Block getBlockOnPos(const BlockPos &pos);
~DBRedis();
private:
int m_blocksReadCount;
int m_blocksQueriedCount;
redisContext *ctx;
std::string hash;
BlockPosList m_blockPosList;
};
#endif // DB_REDIS_HEADER