From: hackbard Date: Sat, 4 Nov 2017 13:46:14 +0000 (+0100) Subject: added raw function to query views X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=outofuni%2Fjsutils.git added raw function to query views --- diff --git a/couchdb.js b/couchdb.js index 45b63f1..d057d68 100644 --- a/couchdb.js +++ b/couchdb.js @@ -66,6 +66,13 @@ var couchdb = { callback(ret.total_rows); }); }, + get_raw: function(db,raw,callback) { + var url=couchdb.type+"://"+couchdb.host+":"+couchdb.port+"/"+ + couchdb.prefix+db+raw; + couchdb.cdb_xhr('GET',url,null,function(ret) { + callback(ret); + }); + }, get_item: function(db,key,callback) { var url=couchdb.type+"://"+couchdb.host+":"+couchdb.port+"/"+ couchdb.prefix+db+"/"+key;