[Pkg-javascript-commits] [node-leveldown] 138/492: documentation for approximateSize()

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit be67b0a5151a4040a431466e2e51ca5162fdc1da
Author: David Björklund <david.bjorklund at gmail.com>
Date:   Sun Dec 30 11:25:27 2012 +0100

    documentation for approximateSize()
---
 README.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/README.md b/README.md
index 7eddb2e..c169b5a 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,7 @@ db.put('name', 'LevelUP', function (err) {
   * <a href="#get"><code>db.<b>get()</b></code></a>
   * <a href="#del"><code>db.<b>del()</b></code></a>
   * <a href="#batch"><code>db.<b>batch()</b></code></a>
+  * <a href="#approximateSize"><code>db.<b>approximateSize()</b></code></a>
   * <a href="#isOpen"><code>db.<b>isOpen()</b></code></a>
   * <a href="#isClosed"><code>db.<b>isClosed()</b></code></a>
   * <a href="#readStream"><code>db.<b>readStream()</b></code></a>
@@ -197,6 +198,18 @@ db.batch(ops, function (err) {
 See <a href="#put"><code>put()</code></a> for a discussion on the `options` object. You can overwrite default `key` and `value` encodings and also specify the use of `sync` filesystem operations.
 
 --------------------------------------------------------
+<a name='approximateSize'></a>
+### db.approximateSize(start, end[, callback])
+<code>approximateSize()</code> can used to get the approximate number of bytes of file system space used by the range `[start..end)`. The result may not include recently written data.
+
+```js
+db.approximateSize('a', 'c', function(err, size) {
+  if (err) return console.log('Ooops!', err)
+  console.log('Approximate size of range is %d', size)
+})
+```
+
+--------------------------------------------------------
 <a name="isOpen"></a>
 ### db.isOpen()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list