changeset 22:7b418d9d27f8

Added a getLength() method to DB.
author Atul Varma <varmaa@toolness.com>
date Mon, 13 Apr 2009 14:39:51 -0700
parents 029b3e094e67
children ed362e47defe
files browser-couch.js
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/browser-couch.js	Mon Apr 13 14:07:22 2009 -0700
+++ b/browser-couch.js	Mon Apr 13 14:39:51 2009 -0700
@@ -170,6 +170,10 @@
       cb();
     };
 
+    this.getLength = function DB_getLength() {
+      return dict.getKeys().length;
+    };
+
     this.view = function DB_view(options) {
       // TODO: Add support for worker threads.