Skip to content

Commit

Permalink
Refactor readStream.js to use projection in find
Browse files Browse the repository at this point in the history
query.
  • Loading branch information
KillianG committed Nov 13, 2023
1 parent 5fe0098 commit 007ff4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/storage/metadata/mongoclient/readStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class MongoReadStream extends Readable {
Object.assign(query, searchOptions);
}

this._cursor = c.find(query, { 'value.location': 0 }).sort({
const projection = { 'value.location': 0 };
this._cursor = c.find(query, { projection }).sort({
_id: options.reverse ? -1 : 1,
});
console.log(query);

Check failure on line 92 in lib/storage/metadata/mongoclient/readStream.js

View workflow job for this annotation

GitHub Actions / test

Unexpected console statement
Expand Down

0 comments on commit 007ff4b

Please sign in to comment.