Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

getCollection is not a function? #44

Open
KevinBurton opened this issue Jan 27, 2016 · 1 comment
Open

getCollection is not a function? #44

KevinBurton opened this issue Jan 27, 2016 · 1 comment

Comments

@KevinBurton
Copy link

I have the code:

var pmongo = require('promised-mongo');
var db = pmongo(mongodbConfig.url, mongodbConfig.options, mongodbConfig.collections);
db.getCollection('name')

But I get an error that db.getCollection is not a function. Are not all the mongo api calls available?

Thank you.

@KevinBurton
Copy link
Author

Maybe the documentation needs to be updated because I am finding a number of functions that are not available like listCollections, the collections that are a result of runCommand don't accept forEach or hasNext() on the cursor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant