You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2013/03/20 00:24:40 UTC
[1/50] git commit: Add results meta to all docs collection
Add results meta to all docs collection
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0649bafa
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0649bafa
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0649bafa
Branch: refs/heads/master
Commit: 0649bafacf15669d294258187e6c189759c1c93a
Parents: 7d73a82
Author: Russell Branca <ch...@gmail.com>
Authored: Tue Mar 5 17:13:27 2013 -0800
Committer: Russell Branca <ch...@gmail.com>
Committed: Tue Mar 5 17:13:27 2013 -0800
----------------------------------------------------------------------
src/fauxton/app/modules/documents/resources.js | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0649bafa/src/fauxton/app/modules/documents/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js
index 862226d..3724369 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -160,7 +160,21 @@ function(app, FauxtonAPI, Views) {
return app.host + "/" + this.database.id + "/_all_docs" + query;
},
+ totalRows: function() {
+ return this.viewMeta.total_rows || "unknown";
+ },
+
+ updateSeq: function() {
+ return this.viewMeta.update_seq || false;
+ },
+
parse: function(resp) {
+ that = this;
+ this.viewMeta = {
+ total_rows: resp.total_rows,
+ offest: resp.offest,
+ update_seq: resp.update_seq
+ };
return _.map(resp.rows, function(row) {
return {
_id: row.id,