Comparing version 3.1.3 to 3.2.0
21
nano.js
@@ -740,2 +740,22 @@ /* minimal couch in node | ||
/* | ||
* calls a show function | ||
* | ||
* @param {design_name:string} design document name | ||
* @param {show_fn_name:string} show function to call | ||
* @param {docId:string} id of the doc | ||
* @param {params:object:optional} additions to the querystring | ||
* | ||
* @see relax | ||
*/ | ||
function show_doc(design_name,show_fn_name,docId,params,callback) { | ||
if(typeof params === "function") { | ||
callback = params; | ||
params = {}; | ||
} | ||
var show_fn_path = '_design/' + design_name + '/_show/' + show_fn_name + '/' + docId; | ||
return relax({db: db_name, path: show_fn_path | ||
, method: "GET", params: params},callback); | ||
} | ||
/* | ||
@@ -881,2 +901,3 @@ * calls document update handler design document | ||
} | ||
, show : show_doc | ||
, atomic : update_with_handler_doc | ||
@@ -883,0 +904,0 @@ , updateWithHandler : update_with_handler_doc // alias |
@@ -5,3 +5,3 @@ { "name" : "nano" | ||
, "repository" : "git://github.com/dscape/nano" | ||
, "version" : "3.1.3" | ||
, "version" : "3.2.0" | ||
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" | ||
@@ -26,2 +26,3 @@ , "contributors" : | ||
, "John Lancaster <john.k.lancaster@gmail.com> (http://jlank.com)" | ||
, "Clemens Stolle (https://github.com/klaemo)" | ||
] | ||
@@ -37,3 +38,3 @@ , "keywords" : | ||
{ "async" : "0.1.x" | ||
, "specify" : "0.5.x" | ||
, "specify" : "0.6.x" | ||
, "nock" : "0.13.x" | ||
@@ -43,2 +44,4 @@ } | ||
{ "test" : "node node_modules/specify/bin/specify -e NOCK=on" | ||
, "compact" : | ||
"node node_modules/specify/bin/specify -e NOCK=on -r compact" | ||
, "nock_off" : "node node_modules/specify/bin/specify" | ||
@@ -48,2 +51,2 @@ } | ||
, "engines" : { "node": ">=0.3.6" } | ||
} | ||
} |
@@ -453,2 +453,17 @@ # nano | ||
### db.show(designname, showname, docId, [params], [callback]) | ||
calls a show function of the specified design for the document specified by docId with | ||
optional query string additions `params`. | ||
``` js | ||
alice.show('characters', 'formatDoc', '3621898430' function(err, doc) { | ||
if (!err) { | ||
console.log(doc); | ||
} | ||
}); | ||
``` | ||
take a look at the [couchdb wiki](http://wiki.apache.org/couchdb/Formatting_with_Show_and_List#Showing_Documents) | ||
for possible query paramaters and more information on show functions. | ||
### db.atomic(designname, updatename, docname, [body], [callback]) | ||
@@ -455,0 +470,0 @@ |
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
143911
79
3447
663