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

Support for caching Database objects. #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jellonek
Copy link

  • Added _db_cache support, for caching Database object, for
    support of add_son_manipulator purpose.

Without this patch - every call to Connection.get_database returned new instance of pymongo.database.Database. Because of that - .add_son_manipulator on such instance was useless.

After this patch - after connecting, You can add son_manipulator to db object (or many of them) once on start (this db object will be persistent through calls to get_database). son_manipulator then will be accessible through whole session.

 * Added _db_cache support, for caching Database object, for
   support of add_son_manipulator purpose.
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.

1 participant