xref: /aosp_15_r20/external/leveldb/db/builder.h (revision 9507f98c5f32dee4b5f9e4a38cd499f3ff5c4490)
1*9507f98cSAndroid Build Coastguard Worker // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2*9507f98cSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*9507f98cSAndroid Build Coastguard Worker // found in the LICENSE file. See the AUTHORS file for names of contributors.
4*9507f98cSAndroid Build Coastguard Worker 
5*9507f98cSAndroid Build Coastguard Worker #ifndef STORAGE_LEVELDB_DB_BUILDER_H_
6*9507f98cSAndroid Build Coastguard Worker #define STORAGE_LEVELDB_DB_BUILDER_H_
7*9507f98cSAndroid Build Coastguard Worker 
8*9507f98cSAndroid Build Coastguard Worker #include "leveldb/status.h"
9*9507f98cSAndroid Build Coastguard Worker 
10*9507f98cSAndroid Build Coastguard Worker namespace leveldb {
11*9507f98cSAndroid Build Coastguard Worker 
12*9507f98cSAndroid Build Coastguard Worker struct Options;
13*9507f98cSAndroid Build Coastguard Worker struct FileMetaData;
14*9507f98cSAndroid Build Coastguard Worker 
15*9507f98cSAndroid Build Coastguard Worker class Env;
16*9507f98cSAndroid Build Coastguard Worker class Iterator;
17*9507f98cSAndroid Build Coastguard Worker class TableCache;
18*9507f98cSAndroid Build Coastguard Worker class VersionEdit;
19*9507f98cSAndroid Build Coastguard Worker 
20*9507f98cSAndroid Build Coastguard Worker // Build a Table file from the contents of *iter.  The generated file
21*9507f98cSAndroid Build Coastguard Worker // will be named according to meta->number.  On success, the rest of
22*9507f98cSAndroid Build Coastguard Worker // *meta will be filled with metadata about the generated table.
23*9507f98cSAndroid Build Coastguard Worker // If no data is present in *iter, meta->file_size will be set to
24*9507f98cSAndroid Build Coastguard Worker // zero, and no Table file will be produced.
25*9507f98cSAndroid Build Coastguard Worker Status BuildTable(const std::string& dbname, Env* env, const Options& options,
26*9507f98cSAndroid Build Coastguard Worker                   TableCache* table_cache, Iterator* iter, FileMetaData* meta);
27*9507f98cSAndroid Build Coastguard Worker 
28*9507f98cSAndroid Build Coastguard Worker }  // namespace leveldb
29*9507f98cSAndroid Build Coastguard Worker 
30*9507f98cSAndroid Build Coastguard Worker #endif  // STORAGE_LEVELDB_DB_BUILDER_H_
31