mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Rename noRetry -> noRefresh, also introduce a helper method that never refreshes
This commit is contained in:
@@ -673,7 +673,7 @@ _.extend(RemoteCatalog.prototype, {
|
||||
options = options || {};
|
||||
|
||||
var results = self.db.query(query, values);
|
||||
if (results.length !== 0 || options.noRetry)
|
||||
if (results.length !== 0 || options.noRefresh)
|
||||
return results;
|
||||
|
||||
// XXX: This causes unnecessary refreshes
|
||||
@@ -684,11 +684,20 @@ _.extend(RemoteCatalog.prototype, {
|
||||
self.refresh();
|
||||
|
||||
options = _.clone(options);
|
||||
options.noRetry = true;
|
||||
options.noRefresh = true;
|
||||
|
||||
return self._queryWithRetry(query, values, options);
|
||||
},
|
||||
|
||||
|
||||
_simpleQuery: function (query, params) {
|
||||
var self = this;
|
||||
var rows = self.db.query(query, params);
|
||||
return _.map(rows, function(entity) {
|
||||
return JSON.parse(entity.content);
|
||||
});
|
||||
},
|
||||
|
||||
// Execute a query using the values as arguments of the query and return the result as JSON.
|
||||
// This code assumes that the table being queried always have a column called "content"
|
||||
_queryAsJSON: function (query, values, options) {
|
||||
|
||||
Reference in New Issue
Block a user