Browse files

pass along options hash to allDocs view

  • Loading branch information...
1 parent 1771c4d commit b3f3ad508decbfc6ffea47db05b575a928b8bae3 Nathan committed Sep 29, 2009
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/couchdb/database.js
View
10 lib/couchdb/database.js
@@ -20,12 +20,12 @@ function Database(server, name) {
Database.prototype = {
allDocs: function(options){
- options = options || {};
+ var results = [];
- var include_docs = options.include_docs || true,
- results = [];
+ options = options || {};
+ options.include_docs = options.include_docs || true;
- this.httpClient.get(this.uri() + encodeURIComponent("_all_docs") + encodeOptions({ include_docs: include_docs }), {
+ this.httpClient.get(this.uri() + encodeURIComponent("_all_docs") + encodeOptions(options), {
async: false,
success: function(data, textStatus){
results = data.rows || [];
@@ -79,7 +79,7 @@ Database.prototype = {
settings.success(doc);
},
error: function(xhr, textStatus, errorThrown){
- print("BulkSave Failure: " + xhr.status);
+ print("BulkSave Failure: " + xhr.status + " " + textStatus);
err = { status: xhr.status,
textStatus: textStatus,
errorThrown: errorThrown

0 comments on commit b3f3ad5

Please sign in to comment.