TwoLevelIterator (table/two_level_iterator.cc)

bitconnectcoin · src/leveldb/table/two_level_iterator.cc · cpp · MIT
database

Iterator that traverses two-level index and data blocks in LevelDB.

// Source: https://github.com/bitconnectcoin/bitconnectcoin | License: MIT | Copyright 2014 bitconnect Developers
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#include "table/two_level_iterator.h"

#include "leveldb/table.h"
#include "table/block.h"
#include "table/format.h"
#include "table/iterator_wrapper.h"

namespace leveldb {

namespace {

typedef Iterator* (*BlockFunction)(void*, const ReadOptions&, const Slice&);

class TwoLevelIterator: public Iterator {
 public:
  TwoLevelIterator(
    Iterator* index_iter,
    BlockFunction block_function,
    voi

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key