Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions db.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ exports.stringifyQuery = function (query) {
exports.request = function (options, callback) {
options.complete = onComplete(options, callback);
options.dataType = 'json';
$.ajax(options);
return $.ajax(options);
};


Expand All @@ -279,7 +279,7 @@ exports.createDatabase = function (name, callback) {
type: 'PUT',
url: '/' + exports.encode(name.replace(/^\/+/, ''))
};
exports.request(req, callback);
return exports.request(req, callback);
};

/**
Expand All @@ -301,7 +301,7 @@ exports.deleteDatabase = function (name, callback) {
type: 'DELETE',
url: '/' + exports.encode(name.replace(/^\/+/, ''))
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand All @@ -322,7 +322,7 @@ exports.allDbs = function (callback) {
type: 'GET',
url: '/_all_dbs'
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -351,7 +351,7 @@ exports.newUUID = function (cacheNum, callback) {
data: {count: cacheNum},
expect_json: true
};
exports.request(req, function (err, resp) {
return exports.request(req, function (err, resp) {
if (err) {
return callback(err);
}
Expand Down Expand Up @@ -467,7 +467,7 @@ DB.prototype.getRewrite = function (name, path, /*optional*/q, callback) {
url: this.url + '/_design/' + exports.encode(name) + '/_rewrite' + path,
data: data
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -516,7 +516,7 @@ DB.prototype.allDocs = function (/*optional*/q, callback) {
data: data,
expect_json: true
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -551,7 +551,7 @@ DB.prototype.getDoc = function (id, /*optional*/q, callback) {
expect_json: true,
data: data
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -589,7 +589,7 @@ DB.prototype.saveDoc = function (doc, callback) {
contentType: 'application/json',
expect_json: true
};
exports.request(req, callback);
return exports.request(req, callback);
};

/**
Expand All @@ -615,7 +615,7 @@ DB.prototype.removeDoc = function (doc, callback) {
url: this.url + '/' + exports.encode(doc._id) +
'?rev=' + exports.encode(doc._rev)
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -652,7 +652,7 @@ DB.prototype.getView = function (name, view, /*opt*/q, callback) {
expect_json: true,
data: data
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -695,7 +695,7 @@ DB.prototype.getSpatialView = function (name, view, q, callback) {
expect_json: true,
data: data
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -733,7 +733,7 @@ DB.prototype.getList = function (name, list, view, /*optional*/q, callback) {
'/_list/' + listname + '/' + viewname,
data: data
};
exports.request(req, callback);
return exports.request(req, callback);
};

/**
Expand Down Expand Up @@ -770,7 +770,7 @@ DB.prototype.getShow = function (name, show, docid, /*optional*/q, callback) {
url: show_url + (docid ? '/' + exports.encode(docid): ''),
data: data
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -806,7 +806,7 @@ DB.prototype.info = function (callback) {
url: this.url,
expect_json: true,
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -928,7 +928,7 @@ DB.prototype.bulkSave = function (docs, /*optional*/ options, callback) {
contentType: 'application/json',
expect_json: true
};
exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down Expand Up @@ -1000,7 +1000,7 @@ DB.prototype.bulkGet = function (keys, /*optional*/ q, callback) {
});
}

exports.request(req, callback);
return exports.request(req, callback);
};


Expand Down