mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
update processSortedSet to use withScores
This commit is contained in:
committed by
GitHub
parent
cf75c79611
commit
5a69f979a8
@@ -697,7 +697,7 @@ DELETE FROM "legacy_zset" z
|
|||||||
|
|
||||||
var batchSize = (options || {}).batch || 100;
|
var batchSize = (options || {}).batch || 100;
|
||||||
var query = client.query(new Cursor(`
|
var query = client.query(new Cursor(`
|
||||||
SELECT z."value" v
|
SELECT z."value", z."score" v
|
||||||
FROM "legacy_object_live" o
|
FROM "legacy_object_live" o
|
||||||
INNER JOIN "legacy_zset" z
|
INNER JOIN "legacy_zset" z
|
||||||
ON o."_key" = z."_key"
|
ON o."_key" = z."_key"
|
||||||
@@ -716,7 +716,7 @@ SELECT z."value" v
|
|||||||
}
|
}
|
||||||
|
|
||||||
rows = rows.map(function (row) {
|
rows = rows.map(function (row) {
|
||||||
return row.v;
|
return options.withScores ? row : row.v;
|
||||||
});
|
});
|
||||||
|
|
||||||
process(rows, function (err) {
|
process(rows, function (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user