Skip to content

RUBY-945 Add #database_names and #list_databases methods to Client and #list_collections method to Database #632

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

Merged
merged 2 commits into from
Jun 11, 2015

Conversation

estolfo
Copy link
Contributor

@estolfo estolfo commented Jun 9, 2015

No description provided.

#
# @since 2.0.5
def database_names
Database.new(self, Database::ADMIN, options).command(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of constructing a new Database what do you think about consuming our own API and using #use here? Ex:

use(Database::ADMIN).command(listDatabases: 1).first['databases'].collect{ |info| info['name'] }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's better, thanks!

@estolfo estolfo force-pushed the RUBY-945-database-names branch 2 times, most recently from d0c1669 to f808922 Compare June 9, 2015 20:15
@estolfo estolfo changed the title RUBY-945 Add #database_names method to client RUBY-945 Add #database_names and #database_info methods to client Jun 9, 2015
@estolfo estolfo force-pushed the RUBY-945-database-names branch 2 times, most recently from 2c99ef2 to 324ffd6 Compare June 9, 2015 20:27
@estolfo estolfo force-pushed the RUBY-945-database-names branch from 324ffd6 to 300cb5b Compare June 10, 2015 08:55
@estolfo estolfo changed the title RUBY-945 Add #database_names and #database_info methods to client RUBY-945 Add #database_names and #list_databases methods to Client and #list_collections helper to Collection Jun 10, 2015
@estolfo estolfo force-pushed the RUBY-945-database-names branch from c0ee361 to c4e0c46 Compare June 11, 2015 08:13
@estolfo estolfo changed the title RUBY-945 Add #database_names and #list_databases methods to Client and #list_collections helper to Collection RUBY-945 Add #database_names and #list_databases methods to Client and #list_collections method to Collection Jun 11, 2015
@estolfo estolfo changed the title RUBY-945 Add #database_names and #list_databases methods to Client and #list_collections method to Collection RUBY-945 Add #database_names and #list_databases methods to Client and #list_collections method to Database Jun 11, 2015
estolfo added a commit that referenced this pull request Jun 11, 2015
RUBY-945 Add #database_names and #list_databases methods to Client and #list_collections method to Database
@estolfo estolfo merged commit 60871a3 into mongodb:2.0-stable Jun 11, 2015
@estolfo estolfo deleted the RUBY-945-database-names branch June 22, 2015 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants