librime: rime::LevelDbWrapper Struct Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Public Attributes | List of all members
rime::LevelDbWrapper Struct Reference

## Public Member Functions
leveldb::Status | Open (const path &file_path, bool readonly)
void | Release ()
LevelDbCursor * | CreateCursor ()
bool | Fetch (const string &key, string *value)
bool | Update (const string &key, const string &value, bool write_batch)
bool | Erase (const string &key, bool write_batch)
void | ClearBatch ()
bool | CommitBatch ()

## Public Attributes
leveldb::DB * | ptr = nullptr
leveldb::WriteBatch | batch

## Member Function Documentation

## ◆ ClearBatch()

void rime::LevelDbWrapper::ClearBatch | ( |  | ) |
| inline

## ◆ CommitBatch()

bool rime::LevelDbWrapper::CommitBatch | ( |  | ) |
| inline

## ◆ CreateCursor()

LevelDbCursor * rime::LevelDbWrapper::CreateCursor | ( |  | ) |
| inline

## ◆ Erase()

bool rime::LevelDbWrapper::Erase | ( | const string & | key,
|  | bool | write_batch )
| inline

## ◆ Fetch()

bool rime::LevelDbWrapper::Fetch | ( | const string & | key,
|  | string * | value )
| inline

## ◆ Open()

leveldb::Status rime::LevelDbWrapper::Open | ( | const path & | file_path,
|  | bool | readonly )
| inline

## ◆ Release()

void rime::LevelDbWrapper::Release | ( |  | ) |
| inline

## ◆ Update()

bool rime::LevelDbWrapper::Update | ( | const string & | key,
|  | const string & | value,
|  | bool | write_batch )
| inline

## Member Data Documentation

## ◆ batch

leveldb::WriteBatch rime::LevelDbWrapper::batch

## ◆ ptr

leveldb::DB* rime::LevelDbWrapper::ptr = nullptr

The documentation for this struct was generated from the following file:

- level_db.cc