Commit f641ef58 authored by Bryan Kaperick's avatar Bryan Kaperick

Put pack function in better location.

parent b51c6860
...@@ -115,7 +115,9 @@ ...@@ -115,7 +115,9 @@
this._include_revisions = false; this._include_revisions = false;
} }
var substorage = this._sub_storage; var substorage = this._sub_storage;
this.packOldRevisions = function (save_info) { }
RevisionStorage.prototype.packOldRevisions = function (save_info) {
/** /**
save_info has this form: save_info has this form:
{ {
...@@ -125,7 +127,8 @@ ...@@ -125,7 +127,8 @@
keep_latest_num = x: keep at most the x latest copies of each unique doc keep_latest_num = x: keep at most the x latest copies of each unique doc
keep_active_revs = x: throw away all outdated revisions from before x keep_active_revs = x: throw away all outdated revisions from before x
**/ **/
var options = { var substorage = this._sub_storage,
options = {
sort_on: [["timestamp", "descending"]], sort_on: [["timestamp", "descending"]],
select_list: ["doc", "doc_id", "op"] select_list: ["doc", "doc_id", "op"]
}, },
...@@ -142,7 +145,6 @@ ...@@ -142,7 +145,6 @@
}); });
}); });
}; };
}
RevisionStorage.prototype.get = function (id_in) { RevisionStorage.prototype.get = function (id_in) {
...@@ -385,6 +387,7 @@ ...@@ -385,6 +387,7 @@
return substorage.putAttachment(timestamp, name, blob); return substorage.putAttachment(timestamp, name, blob);
}); });
}; };
RevisionStorage.prototype.getAttachment = function (id, name) { RevisionStorage.prototype.getAttachment = function (id, name) {
// In this case, id is a timestamp, so return attachment version at that // In this case, id is a timestamp, so return attachment version at that
......
...@@ -2608,7 +2608,7 @@ ...@@ -2608,7 +2608,7 @@
}); });
test("Retrieving revision with attachments with less straightforward ordering", test("Retrieving revision attachments with less straightforward ordering",
function () { function () {
stop(); stop();
expect(1); expect(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment