Skip to content
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

How to drop a MongoDB database with txmongo? #144

Closed
aalex opened this issue Mar 4, 2016 · 5 comments
Closed

How to drop a MongoDB database with txmongo? #144

aalex opened this issue Mar 4, 2016 · 5 comments

Comments

@aalex
Copy link

aalex commented Mar 4, 2016

An example would be lovely.

@IlyaSkriblovsky
Copy link
Contributor

Seems like txmongo doesn't have shortcut method for dropping database (yet).

But this can be easily done via command: conn.db.command("dropDatabase")

@psi29a psi29a added this to the 16.0 - Getting things fixed milestone Mar 4, 2016
@psi29a
Copy link
Contributor

psi29a commented Mar 4, 2016

Would this mean that @aalex would be the first person to use TxMongo to drop a database!? ;)

Thanks for the heads up.

@aalex
Copy link
Author

aalex commented Mar 4, 2016

Great! Thank you! It suggest that it should be added to txmongo.database as a drop() method.

@IlyaSkriblovsky
Copy link
Contributor

Sounds reasonable, but PyMongo has drop_database method in MongoClient class instead: http://api.mongodb.org/python/current/api/pymongo/mongo_client.html

We probably can have both

@psi29a
Copy link
Contributor

psi29a commented Oct 15, 2016

We now support drop_database thanks to @IlyaSkriblovsky commit: 4e11919

This is done in connection pool.

@psi29a psi29a closed this as completed Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants