Skip to content

Commit

Permalink
pass along options hash to allDocs view
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan authored and Nathan committed Sep 29, 2009
1 parent 1771c4d commit b3f3ad5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/couchdb/database.js
Expand Up @@ -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 || [];
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b3f3ad5

Please sign in to comment.