-
Notifications
You must be signed in to change notification settings - Fork 266
Add MongoClient and Database objects #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
public function selectDatabase($databaseName, WriteConcern $writeConcern = null, ReadPreference $readPreferences = null) | ||
{ | ||
return new Database($this->manager, "{$databaseName}", $writeConcern, $readPreferences); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't "{$databaseName}"
redundant? I assume Database's constructor can do a string cast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, its because I first did selectCollection() and then selectDatabase() copied from that :)
Fixed
8c5b4db
to
b42d45c
Compare
use MongoDB\Database; | ||
use MongoDB\Collection; | ||
|
||
class MongoClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider switching this to Client, as "Mongo" is redundant here.
b42d45c
to
acefa85
Compare
acefa85
to
94ff4de
Compare
Add MongoClient and Database objects
No description provided.