Permalink
Browse files

removed print statements and added documentation to addAttachmentToDoc

  • Loading branch information...
1 parent 29d54ac commit 3f1c0aab09651459ca5181db6eece0f28b5a6f34 Nathan committed Nov 30, 2009
Showing with 4 additions and 13 deletions.
  1. +4 −13 lib/couchdb/database.js
View
@@ -80,7 +80,6 @@ var Database = {
},
error: function(xhr) {
removed = false;
- print("ERROR: " + xhr.status);
}
});
@@ -238,8 +237,6 @@ var Database = {
complete: function(xhr, textStatus) {
var status = xhr.status;
var etag = xhr.getResponseHeader("Etag");
- print("View Complete, Etag is '" + etag + "'" + " '" + viewName + "'");
- print("Status is '" + status + "'");
viewResult.status = status;
if (typeof etag === "string") {
@@ -251,10 +248,6 @@ var Database = {
}
};
if (typeof options.etag !== "undefined" && options.etag !== null) {
- //if (/^["']/.test(options.etag)) {
- // options.etag = options.etag.substring(1, options.etag.length - 1);
- //}
- print("adding If-None-Match: " + options.etag);
httpClientOptions.headers = [{ label: "If-None-Match", value: options.etag }];
delete options.etag;
}
@@ -291,7 +284,6 @@ var Database = {
}
var listUri = this.uri + "_design/" + designDocName + "/_list/" + listName + "/" + viewName + encodeOptions(options);
- print("list: " + listUri);
this.httpClient[verb](listUri, {
async: false,
@@ -340,7 +332,6 @@ var Database = {
var fullTextResult = [];
var uri = this.uri + "_fti/" + designDocName + "/" + fullTextViewName + encodeOptions(options);
- print(uri);
this.httpClient.get(uri, {
async: false,
@@ -358,10 +349,10 @@ var Database = {
/**
* Add an attachment to a document
*
- * @param doc
- * @param attachmentName
- * @param contentType
- * @param attachmentData
+ * @param {Object} doc Document to add attachment to
+ * @param {String} attachmentName Name of the attachment
+ * @param {String} contentType Content type of the attachment
+ * @param {Array} attachmentData Binary data
*/
addAttachmentToDoc: function(doc, attachmentName, contentType, attachmentData) {
var response = true;

0 comments on commit 3f1c0aa

Please sign in to comment.