merger.h 860 B

1234567891011121314151617181920212223242526
  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. #ifndef STORAGE_LEVELDB_TABLE_MERGER_H_
  5. #define STORAGE_LEVELDB_TABLE_MERGER_H_
  6. namespace leveldb {
  7. class Comparator;
  8. class Iterator;
  9. // Return an iterator that provided the union of the data in
  10. // children[0,n-1]. Takes ownership of the child iterators and
  11. // will delete them when the result iterator is deleted.
  12. //
  13. // The result does no duplicate suppression. I.e., if a particular
  14. // key is present in K child iterators, it will be yielded K times.
  15. //
  16. // REQUIRES: n >= 0
  17. Iterator* NewMergingIterator(
  18. const Comparator* comparator, Iterator** children, int n);
  19. } // namespace leveldb
  20. #endif // STORAGE_LEVELDB_TABLE_MERGER_H_