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

feat: Add support for async proxy connection. #2278

Merged
merged 8 commits into from
Aug 20, 2024

Conversation

langyo
Copy link
Contributor

@langyo langyo commented Jul 3, 2024

PR Info

Bug Fixes

  • Now the proxy connection trait can use async declarations.

Breaking Changes

  • The proxy connection would always deal the data under asynchronous mode.

Changes

  • Add an example for Cloudflare worker that control D1 database by sea-orm. See this demo. It may need to fix the upper dependent from Cloudflare that is not supported to get the SQL execute result, such as last insert id.

@langyo
Copy link
Contributor Author

langyo commented Jul 4, 2024

Based on the work of worker-rs #591, this PR can now be officially considered for merging. After the upstream branch is successfully merged, I'll take some time to further supplement the demo of how to connect to Cloudflare's D1 based on sea-orm.

@langyo langyo marked this pull request as ready for review July 4, 2024 20:41
@langyo

This comment was marked as outdated.

@langyo
Copy link
Contributor Author

langyo commented Aug 14, 2024

Sorry to bother you again. I found that the main branch has released version 1.0 and is almost about to release version 1.1, but this PR has not been reviewed yet. Please take a look at it if possible.
This patch will further strengthen the robustness of the proxy connection interface, making it easier to connect to environments such as NodeJS WASM runtime or some serverless containers like Cloudflare Worker.

@tyt2y3 @billy1624

@tyt2y3
Copy link
Member

tyt2y3 commented Aug 15, 2024

sorry for missing this. I see, so the interface changed. Ideally we should break it in 1.0 haha!
since this feature is behind a guard, I hope it will be okay to break it lol

@tyt2y3 tyt2y3 merged commit 85fc3d0 into SeaQL:master Aug 20, 2024
36 checks passed
tyt2y3 pushed a commit that referenced this pull request Aug 20, 2024
* Try to attach async to proxy trait first.

* Update proxy connection to support async.

* Add example.

* Try to fix CI.

* Remove CI for cloudflare worker example at this moment...

* Improve SQL serializer
Copy link

🎉 Released In 1.0.1 🎉

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 ⭐.

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