blob: 4efcb04a52651dbee439c0c392f57f7715d5aafb [file] [log] [blame]
jorlow@chromium.orgf67e15e2011-03-18 22:37:00 +00001// 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.org4671a692011-03-30 18:35:40 +00008#include "leveldb/status.h"
jorlow@chromium.orgf67e15e2011-03-18 22:37:00 +00009
10namespace leveldb {
11
12struct Options;
13struct FileMetaData;
14
15class Env;
16class Iterator;
17class TableCache;
18class 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, and
23// large value refs and the added file information will be added to
24// *edit. If no data is present in *iter, meta->file_size will be set
25// to zero, and no Table file will be produced.
26extern Status BuildTable(const std::string& dbname,
27 Env* env,
28 const Options& options,
29 TableCache* table_cache,
30 Iterator* iter,
31 FileMetaData* meta,
32 VersionEdit* edit);
33
34}
35
36#endif // STORAGE_LEVELDB_DB_BUILDER_H_