Commit 99577d27 authored by Tristan Cavelier's avatar Tristan Cavelier

remove localstorage allDocs key property

parent 65a22f7f
...@@ -424,7 +424,6 @@ ...@@ -424,7 +424,6 @@
if (path_re.test(i)) { if (path_re.test(i)) {
row = { value: {} }; row = { value: {} };
row.id = i.split('/').slice(-1)[0]; row.id = i.split('/').slice(-1)[0];
row.key = row.id;
if (options.include_docs) { if (options.include_docs) {
row.doc = JSON.parse(this._storage.getItem(i)); row.doc = JSON.parse(this._storage.getItem(i));
} }
...@@ -458,8 +457,7 @@ ...@@ -458,8 +457,7 @@
exec(document_list, options).then(function () { exec(document_list, options).then(function () {
document_list = document_list.map(function (value) { document_list = document_list.map(function (value) {
var o = { var o = {
"id": value._id, "id": value._id
"key": value._id
}; };
if (options.include_docs === true) { if (options.include_docs === true) {
o.doc = document_object[value._id]; o.doc = document_object[value._id];
......
...@@ -341,35 +341,27 @@ ...@@ -341,35 +341,27 @@
"total_rows": 8, "total_rows": 8,
"rows": [{ "rows": [{
"id": "A", "id": "A",
"key": "A",
"value": {} "value": {}
}, { }, {
"id": "B", "id": "B",
"key": "B",
"value": {} "value": {}
}, { }, {
"id": "C", "id": "C",
"key": "C",
"value": {} "value": {}
}, { }, {
"id": "D", "id": "D",
"key": "D",
"value": {} "value": {}
}, { }, {
"id": "b", "id": "b",
"key": "b",
"value": {} "value": {}
}, { }, {
"id": "ce", "id": "ce",
"key": "ce",
"value": {} "value": {}
}, { }, {
"id": "dee", "id": "dee",
"key": "dee",
"value": {} "value": {}
}, { }, {
"id": shared.created_document_id, "id": shared.created_document_id,
"key": shared.created_document_id,
"value": {} "value": {}
}] }]
}, },
......
...@@ -539,19 +539,15 @@ ...@@ -539,19 +539,15 @@
"data": { "data": {
"rows": [{ "rows": [{
"id": "a", "id": "a",
"key": "a",
"value": {} "value": {}
}, { }, {
"id": "b", "id": "b",
"key": "b",
"value": {} "value": {}
}, { }, {
"id": "c", "id": "c",
"key": "c",
"value": {} "value": {}
}, { }, {
"id": "d", "id": "d",
"key": "d",
"value": {} "value": {}
}], }],
"total_rows": 4 "total_rows": 4
...@@ -591,7 +587,6 @@ ...@@ -591,7 +587,6 @@
"title": "one" "title": "one"
}, },
"id": "a", "id": "a",
"key": "a",
"value": { "value": {
"date": o.date_a.toJSON(), "date": o.date_a.toJSON(),
"title": "one" "title": "one"
...@@ -603,7 +598,6 @@ ...@@ -603,7 +598,6 @@
"title": "two" "title": "two"
}, },
"id": "d", "id": "d",
"key": "d",
"value": { "value": {
"date": o.date_b.toJSON(), "date": o.date_b.toJSON(),
"title": "two" "title": "two"
...@@ -615,7 +609,6 @@ ...@@ -615,7 +609,6 @@
"title": "two" "title": "two"
}, },
"id": "b", "id": "b",
"key": "b",
"value": { "value": {
"date": o.date_a.toJSON(), "date": o.date_a.toJSON(),
"title": "two" "title": "two"
...@@ -643,11 +636,9 @@ ...@@ -643,11 +636,9 @@
"data": { "data": {
"rows": [{ "rows": [{
"id": "d", "id": "d",
"key": "d",
"value": {} "value": {}
}, { }, {
"id": "b", "id": "b",
"key": "b",
"value": {} "value": {}
}], }],
"total_rows": 2 "total_rows": 2
......
...@@ -586,22 +586,18 @@ ...@@ -586,22 +586,18 @@
"rows": [ "rows": [
{ {
"id": "a", "id": "a",
"key": "a",
"value": {} "value": {}
}, },
{ {
"id": "b", "id": "b",
"key": "b",
"value": {} "value": {}
}, },
{ {
"id": "c", "id": "c",
"key": "c",
"value": {} "value": {}
}, },
{ {
"id": "d", "id": "d",
"key": "d",
"value": {} "value": {}
} }
], ],
......
...@@ -936,23 +936,18 @@ ...@@ -936,23 +936,18 @@
"total_rows": 5, "total_rows": 5,
"rows": [{ "rows": [{
"id": "doc0", "id": "doc0",
"key": "doc0",
"value": {} "value": {}
}, { }, {
"id": "doc1", "id": "doc1",
"key": "doc1",
"value": {} "value": {}
}, { }, {
"id": "doc2", "id": "doc2",
"key": "doc2",
"value": {} "value": {}
}, { }, {
"id": "doc3", "id": "doc3",
"key": "doc3",
"value": {} "value": {}
}, { }, {
"id": "doc4", "id": "doc4",
"key": "doc4",
"value": {} "value": {}
}] }]
}, "AllDocs with document ids only"); }, "AllDocs with document ids only");
......
...@@ -90,19 +90,15 @@ ...@@ -90,19 +90,15 @@
"data": { "data": {
"rows": [{ "rows": [{
"id": "a", "id": "a",
"key": "a",
"value": {} "value": {}
}, { }, {
"id": "b", "id": "b",
"key": "b",
"value": {} "value": {}
}, { }, {
"id": "c", "id": "c",
"key": "c",
"value": {} "value": {}
}, { }, {
"id": "d", "id": "d",
"key": "d",
"value": {} "value": {}
}], }],
"total_rows": 4 "total_rows": 4
...@@ -142,7 +138,6 @@ ...@@ -142,7 +138,6 @@
"title": "one" "title": "one"
}, },
"id": "a", "id": "a",
"key": "a",
"value": { "value": {
"date": o.date_a.toJSON(), "date": o.date_a.toJSON(),
"title": "one" "title": "one"
...@@ -154,7 +149,6 @@ ...@@ -154,7 +149,6 @@
"title": "two" "title": "two"
}, },
"id": "d", "id": "d",
"key": "d",
"value": { "value": {
"date": o.date_b.toJSON(), "date": o.date_b.toJSON(),
"title": "two" "title": "two"
...@@ -166,7 +160,6 @@ ...@@ -166,7 +160,6 @@
"title": "two" "title": "two"
}, },
"id": "b", "id": "b",
"key": "b",
"value": { "value": {
"date": o.date_a.toJSON(), "date": o.date_a.toJSON(),
"title": "two" "title": "two"
...@@ -196,11 +189,9 @@ ...@@ -196,11 +189,9 @@
"data": { "data": {
"rows": [{ "rows": [{
"id": "a", "id": "a",
"key": "a",
"value": {} "value": {}
}, { }, {
"id": "b", "id": "b",
"key": "b",
"value": {} "value": {}
}], }],
"total_rows": 2 "total_rows": 2
......
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