Commit a62101eb authored by Tristan Cavelier's avatar Tristan Cavelier

localstorage and indexstorage, little optimisation done

parent bdb738e0
...@@ -916,17 +916,7 @@ jIO.addStorageType('indexed', function (spec, my) { ...@@ -916,17 +916,7 @@ jIO.addStorageType('indexed', function (spec, my) {
} else { } else {
// we can use index, run query on index // we can use index, run query on index
query_response = query_response =
jIO.ComplexQueries.query({ jIO.ComplexQueries.query(query_syntax, query_object);
query: query_syntax.query,
filter: {
sort_on: query_syntax.filter.sort_on,
limit: query_syntax.filter.limit,
select_list: query_syntax.filter.select_list
},
wildcard_character: query_syntax.wildcard_character
},
query_object
);
that.success(query_response); that.success(query_response);
} }
} else if (command.getOption('include_docs')) { } else if (command.getOption('include_docs')) {
......
...@@ -361,21 +361,11 @@ jIO.addStorageType('local', function (spec, my) { ...@@ -361,21 +361,11 @@ jIO.addStorageType('local', function (spec, my) {
if (s.test(i)) { if (s.test(i)) {
items += 1; items += 1;
j = i.split('/').slice(-1)[0]; j = i.split('/').slice(-1)[0];
query_object.push(JSON.parse(localStorage.getItem(i))); query_object.push(localstorage.getItem(i));
} }
} }
} }
query_response = jIO.ComplexQueries.query({ query_response = jIO.ComplexQueries.query(query_syntax, query_object);
query: query_syntax.query,
filter: {
sort_on: query_syntax.filter.sort_on,
limit: query_syntax.filter.limit,
select_list: query_syntax.filter.select_list
},
wildcard_character: query_syntax.wildcard_character
},
query_object
);
that.success(query_response); that.success(query_response);
} }
}; };
......
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