|
| | ModelDB (const Options &options) |
| |
| | ~ModelDB () |
| |
| virtual Status | Put (const WriteOptions &o, const Slice &k, const Slice &v) |
| |
| virtual Status | Delete (const WriteOptions &o, const Slice &key) |
| |
| virtual Status | Get (const ReadOptions &options, const Slice &key, std::string *value) |
| |
| virtual Iterator * | NewIterator (const ReadOptions &options) |
| |
| virtual const Snapshot * | GetSnapshot () |
| |
| virtual void | ReleaseSnapshot (const Snapshot *snapshot) |
| |
| virtual Status | Write (const WriteOptions &options, WriteBatch *batch) |
| |
| virtual bool | GetProperty (const Slice &property, std::string *value) |
| |
| virtual void | GetApproximateSizes (const Range *r, int n, uint64_t *sizes) |
| |
| virtual void | CompactRange (const Slice *start, const Slice *end) |
| |
| | DB () |
| |
| virtual | ~DB () |
| |
Definition at line 1860 of file db_test.cc.
§ ModelDB()
| leveldb::ModelDB::ModelDB |
( |
const Options & |
options | ) |
|
|
inlineexplicit |
§ ~ModelDB()
| leveldb::ModelDB::~ModelDB |
( |
| ) |
|
|
inline |
§ CompactRange()
| virtual void leveldb::ModelDB::CompactRange |
( |
const Slice * |
start, |
|
|
const Slice * |
end |
|
) |
| |
|
inlinevirtual |
§ Delete()
Implements leveldb::DB.
Definition at line 1872 of file db_test.cc.
virtual Status Delete(const WriteOptions &options, const Slice &key)=0
§ Get()
Implements leveldb::DB.
Definition at line 1875 of file db_test.cc.
static Status NotFound(const Slice &msg, const Slice &msg2=Slice())
§ GetApproximateSizes()
| virtual void leveldb::ModelDB::GetApproximateSizes |
( |
const Range * |
r, |
|
|
int |
n, |
|
|
uint64_t * |
sizes |
|
) |
| |
|
inlinevirtual |
§ GetProperty()
| virtual bool leveldb::ModelDB::GetProperty |
( |
const Slice & |
property, |
|
|
std::string * |
value |
|
) |
| |
|
inlinevirtual |
§ GetSnapshot()
| virtual const Snapshot* leveldb::ModelDB::GetSnapshot |
( |
| ) |
|
|
inlinevirtual |
Implements leveldb::DB.
Definition at line 1891 of file db_test.cc.
1892 ModelSnapshot* snapshot =
new ModelSnapshot;
1893 snapshot->map_ =
map_;
§ NewIterator()
Implements leveldb::DB.
Definition at line 1880 of file db_test.cc.
1881 if (options.snapshot == NULL) {
1884 return new ModelIter(saved,
true);
1886 const KVMap* snapshot_state =
1887 &(
reinterpret_cast<const ModelSnapshot*
>(options.snapshot)->
map_);
1888 return new ModelIter(snapshot_state,
false);
std::map< std::string, std::string, STLLessThan > KVMap
§ Put()
Implements leveldb::DB.
Definition at line 1869 of file db_test.cc.
virtual Status Put(const WriteOptions &options, const Slice &key, const Slice &value)=0
§ ReleaseSnapshot()
| virtual void leveldb::ModelDB::ReleaseSnapshot |
( |
const Snapshot * |
snapshot | ) |
|
|
inlinevirtual |
Implements leveldb::DB.
Definition at line 1897 of file db_test.cc.
1898 delete reinterpret_cast<const ModelSnapshot*
>(snapshot);
§ Write()
Implements leveldb::DB.
Definition at line 1900 of file db_test.cc.
1901 class Handler :
public WriteBatch::Handler {
1904 virtual void Put(
const Slice& key,
const Slice& value) {
1905 (*map_)[key.ToString()] = value.
ToString();
1907 virtual void Delete(
const Slice& key) {
1908 map_->erase(key.ToString());
1912 handler.map_ = &
map_;
1913 return batch->Iterate(&handler);
virtual Status Put(const WriteOptions &o, const Slice &k, const Slice &v)
std::map< std::string, std::string, STLLessThan > KVMap
std::string ToString() const
virtual Status Delete(const WriteOptions &o, const Slice &key)
§ map_
| KVMap leveldb::ModelDB::map_ |
|
private |
§ options_
| const Options leveldb::ModelDB::options_ |
|
private |
The documentation for this class was generated from the following file: