Commit aaaa7dc8 authored by Romain Courteaud's avatar Romain Courteaud

WebSQLStorage: do not sort results

parent 738c87bc
...@@ -347,7 +347,7 @@ ...@@ -347,7 +347,7 @@
if (options.include_docs === true) { if (options.include_docs === true) {
query += ", data AS doc"; query += ", data AS doc";
} }
query += " FROM document ORDER BY id"; query += " FROM document";
return queueSql(db, [query], [[]]); return queueSql(db, [query], [[]]);
}) })
.push(function (result) { .push(function (result) {
......
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
return context.jio.allDocs(); return context.jio.allDocs();
}) })
.then(function () { .then(function () {
equal(context.spy.args[5][0], 'SELECT id FROM document ORDER BY id'); equal(context.spy.args[5][0], 'SELECT id FROM document');
deepEqual(context.spy.args[5][1], []); deepEqual(context.spy.args[5][1], []);
spyStorageCreation(context); spyStorageCreation(context);
return; return;
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
}) })
.then(function () { .then(function () {
equal(context.spy.args[5][0], equal(context.spy.args[5][0],
'SELECT id, data AS doc FROM document ORDER BY id'); 'SELECT id, data AS doc FROM document');
deepEqual(context.spy.args[5][1], []); deepEqual(context.spy.args[5][1], []);
spyStorageCreation(context); spyStorageCreation(context);
return; return;
...@@ -338,13 +338,13 @@ ...@@ -338,13 +338,13 @@
deepEqual(result, { deepEqual(result, {
"data": { "data": {
"rows": [{ "rows": [{
"id": "1",
"doc": {"title": "title1"},
"value": {}
}, {
"id": "2", "id": "2",
"doc": {"title": "title2"}, "doc": {"title": "title2"},
"value": {} "value": {}
}, {
"id": "1",
"doc": {"title": "title1"},
"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