Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add setDatabase to Jenssegers\Mongodb\Connection #2236

Merged
merged 2 commits into from
Apr 30, 2021

Conversation

ThomasWestrelin
Copy link
Contributor

We have a use case where the database is determined dynamically and is not known in advance.
Previously, we used DB::purge() which wasn't ideal as this would cause the previous connection to be closed.

This change would allow us to change the database on demand.

@divine
Copy link
Contributor

divine commented Apr 29, 2021

@Smolevich should we backport this?

Thanks!

@codecov-commenter
Copy link

Codecov Report

Merging #2236 (3bd58e0) into master (114afa0) will decrease coverage by 0.11%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2236      +/-   ##
============================================
- Coverage     86.93%   86.82%   -0.12%     
- Complexity      663      664       +1     
============================================
  Files            33       33              
  Lines          1554     1556       +2     
============================================
  Hits           1351     1351              
- Misses          203      205       +2     
Impacted Files Coverage Δ Complexity Δ
src/Jenssegers/Mongodb/Connection.php 88.73% <0.00%> (-2.58%) 39.00 <1.00> (+1.00) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 114afa0...3bd58e0. Read the comment docs.

@Smolevich Smolevich merged commit 73b6a91 into mongodb:master Apr 30, 2021
mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
…patch-1

Add setDatabase to Jenssegers\Mongodb\Connection
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants