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/ab1fe87a Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ab1fe87a Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ab1fe87a Branch: refs/heads/fauxton-rebase Commit: ab1fe87a44219b60ecd2438de545b713cee4eec4 Parents: ee1fbe3 Author: Russell Branca <[email protected]> Authored: Tue Mar 5 17:13:27 2013 -0800 Committer: Russell Branca <[email protected]> Committed: Fri Mar 15 14:35:41 2013 -0700 ---------------------------------------------------------------------- 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/ab1fe87a/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,
