10225501448 李度 10225101546 陈胤遒 10215501422 高宇菲
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 regels
1.2 KiB

  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_DB_BUILDER_H_
  5. #define STORAGE_LEVELDB_DB_BUILDER_H_
  6. #include "include/status.h"
  7. namespace leveldb {
  8. struct Options;
  9. struct FileMetaData;
  10. class Env;
  11. class Iterator;
  12. class TableCache;
  13. class VersionEdit;
  14. // Build a Table file from the contents of *iter. The generated file
  15. // will be named according to meta->number. On success, the rest of
  16. // *meta will be filled with metadata about the generated table, and
  17. // large value refs and the added file information will be added to
  18. // *edit. If no data is present in *iter, meta->file_size will be set
  19. // to zero, and no Table file will be produced.
  20. extern Status BuildTable(const std::string& dbname,
  21. Env* env,
  22. const Options& options,
  23. TableCache* table_cache,
  24. Iterator* iter,
  25. FileMetaData* meta,
  26. VersionEdit* edit);
  27. }
  28. #endif // STORAGE_LEVELDB_DB_BUILDER_H_