INNER CODE UNIT · JavaScript

Cursor

mongoist/mongoist · lib/collection.js:35

    return new Cursor(() =>
      this.connect().then((collection) => {
        if (this.db.features.useLegacyProjections) {
          return collection.find(query, projection, opts);
        }

        const options = Object.assign({ projection }, opts);
        return collection.find(query, options);
      })
    );
  }

  findOne(query, projection, opts) {
    return this.findAsCursor(query, projection, opts).next();
  }

  findAndModify(opts) {
    return this.runCommand("findAndModify", opts).then(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…