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) {
} else {
// we can use index, run query on index
query_response =
jIO.ComplexQueries.query({
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
);
jIO.ComplexQueries.query(query_syntax, query_object);
that.success(query_response);
}
} else if (command.getOption('include_docs')) {
......
......@@ -361,21 +361,11 @@ jIO.addStorageType('local', function (spec, my) {
if (s.test(i)) {
items += 1;
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: 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
);
query_response = jIO.ComplexQueries.query(query_syntax, query_object);
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