xref: /aosp_15_r20/external/leveldb/db/builder.h (revision 9507f98c5f32dee4b5f9e4a38cd499f3ff5c4490)
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 
8 #include "leveldb/status.h"
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
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.
25 Status BuildTable(const std::string& dbname, Env* env, const Options& options,
26                   TableCache* table_cache, Iterator* iter, FileMetaData* meta);
27 
28 }  // namespace leveldb
29 
30 #endif  // STORAGE_LEVELDB_DB_BUILDER_H_
31