+
Skip to content

Conversation

bragov4ik
Copy link
Contributor

@bragov4ik bragov4ik commented Feb 24, 2025

PR Info

Bug Fixes

  • Allow to close connection by reference

Changes

  • Add close_by_ref methods to close connections with references

@tyt2y3
Copy link
Member

tyt2y3 commented Feb 24, 2025

This is a breaking change. But we can add a new set of methods called close_by_ref

@spencewenski
Copy link
Contributor

Hmm, yeah, I agree this is probably technically a breaking change. However, this would only break when using the fully qualified syntax, e.g. DatabaseConnection::close(connection). This case also isn't specifically mentioned in https://doc.rust-lang.org/cargo/reference/semver.html. So, it may be okay to introduce this change IMO, but that's just my two cents and I'll leave it up to the maintainers to decide.

@bragov4ik
Copy link
Contributor Author

@spencewenski technically, the reference doesn't mention changing a type of existing parameter either, but it would clearly be a breaking change :)
so I agree with close_by_ref

@tyt2y3 I've changed the implementation as you advised

@tyt2y3 tyt2y3 merged commit 9631e35 into SeaQL:master Feb 28, 2025
36 checks passed
Copy link

github-actions bot commented Mar 3, 2025

🎉 Released In 1.1.7 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

hjarraya pushed a commit to sambaclab/sea-orm that referenced this pull request Apr 29, 2025
* close connection by reference

* non-breaking change with 'close_by_ref'
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.

Cannot close DatabaseConnection by reference

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载