summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/leveldb/cache.h2
-rw-r--r--include/leveldb/db.h2
-rw-r--r--include/leveldb/dumpfile.h25
-rw-r--r--include/leveldb/env.h2
-rw-r--r--include/leveldb/iterator.h2
-rw-r--r--include/leveldb/options.h2
6 files changed, 30 insertions, 5 deletions
diff --git a/include/leveldb/cache.h b/include/leveldb/cache.h
index 5e3b476..1a201e5 100644
--- a/include/leveldb/cache.h
+++ b/include/leveldb/cache.h
@@ -96,4 +96,4 @@ class Cache {
} // namespace leveldb
-#endif // STORAGE_LEVELDB_UTIL_CACHE_H_
+#endif // STORAGE_LEVELDB_INCLUDE_CACHE_H_
diff --git a/include/leveldb/db.h b/include/leveldb/db.h
index 40851b2..4c169bf 100644
--- a/include/leveldb/db.h
+++ b/include/leveldb/db.h
@@ -14,7 +14,7 @@ namespace leveldb {
// Update Makefile if you change these
static const int kMajorVersion = 1;
-static const int kMinorVersion = 17;
+static const int kMinorVersion = 18;
struct Options;
struct ReadOptions;
diff --git a/include/leveldb/dumpfile.h b/include/leveldb/dumpfile.h
new file mode 100644
index 0000000..3f97fda
--- /dev/null
+++ b/include/leveldb/dumpfile.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2014 The LevelDB Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+#ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
+#define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
+
+#include <string>
+#include "leveldb/env.h"
+#include "leveldb/status.h"
+
+namespace leveldb {
+
+// Dump the contents of the file named by fname in text format to
+// *dst. Makes a sequence of dst->Append() calls; each call is passed
+// the newline-terminated text corresponding to a single item found
+// in the file.
+//
+// Returns a non-OK result if fname does not name a leveldb storage
+// file, or if the file cannot be read.
+Status DumpFile(Env* env, const std::string& fname, WritableFile* dst);
+
+} // namespace leveldb
+
+#endif // STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
diff --git a/include/leveldb/env.h b/include/leveldb/env.h
index b2072d0..f709514 100644
--- a/include/leveldb/env.h
+++ b/include/leveldb/env.h
@@ -142,7 +142,7 @@ class Env {
// useful for computing deltas of time.
virtual uint64_t NowMicros() = 0;
- // Sleep/delay the thread for the perscribed number of micro-seconds.
+ // Sleep/delay the thread for the prescribed number of micro-seconds.
virtual void SleepForMicroseconds(int micros) = 0;
private:
diff --git a/include/leveldb/iterator.h b/include/leveldb/iterator.h
index ad543eb..76aced0 100644
--- a/include/leveldb/iterator.h
+++ b/include/leveldb/iterator.h
@@ -61,7 +61,7 @@ class Iterator {
// Return the value for the current entry. The underlying storage for
// the returned slice is valid only until the next modification of
// the iterator.
- // REQUIRES: !AtEnd() && !AtStart()
+ // REQUIRES: Valid()
virtual Slice value() const = 0;
// If an error has occurred, return it. Else return an ok status.
diff --git a/include/leveldb/options.h b/include/leveldb/options.h
index fdda718..7c9b973 100644
--- a/include/leveldb/options.h
+++ b/include/leveldb/options.h
@@ -153,7 +153,7 @@ struct ReadOptions {
// If "snapshot" is non-NULL, read as of the supplied snapshot
// (which must belong to the DB that is being read and which must
- // not have been released). If "snapshot" is NULL, use an impliicit
+ // not have been released). If "snapshot" is NULL, use an implicit
// snapshot of the state at the beginning of this read operation.
// Default: NULL
const Snapshot* snapshot;