jorlow@chromium.org | f67e15e | 2011-03-18 22:37:00 +0000 | [diff] [blame] | 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_DB_BUILDER_H_ |
| 6 | #define STORAGE_LEVELDB_DB_BUILDER_H_ |
| 7 | |
jorlow@chromium.org | 4671a69 | 2011-03-30 18:35:40 +0000 | [diff] [blame] | 8 | #include "leveldb/status.h" |
jorlow@chromium.org | f67e15e | 2011-03-18 22:37:00 +0000 | [diff] [blame] | 9 | |
| 10 | namespace leveldb { |
| 11 | |
| 12 | struct Options; |
| 13 | struct FileMetaData; |
| 14 | |
| 15 | class Env; |
| 16 | class Iterator; |
| 17 | class TableCache; |
| 18 | class VersionEdit; |
| 19 | |
| 20 | // Build a Table file from the contents of *iter. The generated file |
| 21 | // will be named according to meta->number. On success, the rest of |
gabor@google.com | ccf0fcd | 2011-06-22 02:36:45 +0000 | [diff] [blame] | 22 | // *meta will be filled with metadata about the generated table. |
| 23 | // If no data is present in *iter, meta->file_size will be set to |
| 24 | // zero, and no Table file will be produced. |
costan | aece206 | 2018-03-12 09:14:44 -0700 | [diff] [blame] | 25 | Status BuildTable(const std::string& dbname, |
| 26 | Env* env, |
| 27 | const Options& options, |
| 28 | TableCache* table_cache, |
| 29 | Iterator* iter, |
| 30 | FileMetaData* meta); |
jorlow@chromium.org | f67e15e | 2011-03-18 22:37:00 +0000 | [diff] [blame] | 31 | |
Hans Wennborg | 36a5f8e | 2011-10-31 17:22:06 +0000 | [diff] [blame] | 32 | } // namespace leveldb |
jorlow@chromium.org | f67e15e | 2011-03-18 22:37:00 +0000 | [diff] [blame] | 33 | |
| 34 | #endif // STORAGE_LEVELDB_DB_BUILDER_H_ |