1// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file. See the AUTHORS file for names of contributors.
4
5#ifndef STORAGE_LEVELDB_TABLE_MERGER_H_
6#define STORAGE_LEVELDB_TABLE_MERGER_H_
7
8namespace leveldb {
9
10class Comparator;
11class Iterator;
12
13// Return an iterator that provided the union of the data in
14// children[0,n-1]. Takes ownership of the child iterators and
15// will delete them when the result iterator is deleted.
16//
17// The result does no duplicate suppression. I.e., if a particular
18// key is present in K child iterators, it will be yielded K times.
19//
20// REQUIRES: n >= 0
21Iterator* NewMergingIterator(const Comparator* comparator, Iterator** children,
22 int n);
23
24} // namespace leveldb
25
26#endif // STORAGE_LEVELDB_TABLE_MERGER_H_
27