mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Use simpler query for getSortedVersions
The old one read and parsed JSON blobs from sqlite instead of just using pre-existing columns.
This commit is contained in:
@@ -564,7 +564,8 @@ _.extend(RemoteCatalog.prototype, {
|
||||
|
||||
getSortedVersions: function (name) {
|
||||
var self = this;
|
||||
var match = this._getPackageVersions(name);
|
||||
var match = this._columnsQuery(
|
||||
"SELECT version FROM versions WHERE packageName=?", name);
|
||||
if (match === null)
|
||||
return [];
|
||||
return _.pluck(match, 'version').sort(VersionParser.compare);
|
||||
@@ -593,14 +594,6 @@ _.extend(RemoteCatalog.prototype, {
|
||||
return result[0];
|
||||
},
|
||||
|
||||
_getPackageVersions: function (name) {
|
||||
if (!name) {
|
||||
throw new Error("No name provided");
|
||||
}
|
||||
return this._contentQuery(
|
||||
"SELECT content FROM versions WHERE packageName=?", name);
|
||||
},
|
||||
|
||||
getAllBuilds: function (name, version) {
|
||||
var result = this._contentQuery(
|
||||
"SELECT * FROM builds WHERE builds.versionId = " +
|
||||
|
||||
Reference in New Issue
Block a user