Comparing version 1.2.1 to 1.3.0
@@ -0,1 +1,6 @@ | ||
# 1.3.0 | ||
* changed api for bulk docs, added `params`. existing behavior should remain | ||
the same | ||
# 0.8.4 | ||
@@ -2,0 +7,0 @@ |
11
nano.js
@@ -477,6 +477,7 @@ /* minimal couch in node | ||
/* | ||
* bulk update/delete/insert functionality | ||
* bulk fetch/update/delete/insert functionality | ||
* [1]: http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API | ||
* | ||
* @param {docs:object} documents as per the couchdb api[1] | ||
* @param {params:object} additions to the querystring | ||
* | ||
@@ -486,4 +487,8 @@ * @see get_doc | ||
*/ | ||
function bulk_docs(docs,callback) { | ||
return relax({db: db_name, path: "_bulk_docs", body: docs, method: "POST"},callback); | ||
function bulk_docs(docs,params,callback) { | ||
if(typeof params === "function") { | ||
callback = params; | ||
params = {}; | ||
} | ||
return relax({db: db_name, path: "_bulk_docs", body: docs, method: "POST", params: params}, callback); | ||
} | ||
@@ -490,0 +495,0 @@ |
@@ -5,3 +5,3 @@ { "name" : "nano" | ||
, "repository" : "git://github.com/dscape/nano" | ||
, "version" : "1.2.1" | ||
, "version" : "1.3.0" | ||
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" | ||
@@ -16,2 +16,3 @@ , "contributors" : | ||
, "Dale Harvey <dale@arandomurl.com> (http://arandomurl.com)" | ||
, "InTheFiveByFive" | ||
] | ||
@@ -18,0 +19,0 @@ , "keywords" : |
@@ -106,3 +106,3 @@ # nano | ||
`db.get(doc_name,params*,callback*)` | ||
`db.bulk(docs,callback*)` | ||
`db.bulk(docs,params*,callback*)` | ||
`db.list(params*,callback*)` | ||
@@ -109,0 +109,0 @@ `db.view(design_name,view_name,params*,callback*)` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119791
2655