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

added reexports for sqlx errors #1181

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

junbl
Copy link
Contributor

@junbl junbl commented Nov 1, 2022

PR Info

With the new RuntimeErr in DbErr it's much nicer to condition on different database errors. However, since we can't directly interact with the private SqlxError or the database-dependent Mysql/Pg/Sqlite errors, we don't get the full benefit of this change.

New Features

  • Adds reexports for sqlx error types so users can interact with them directly.

Changes

  • Changes existing use for SqlxError to reexport as pub use.

@tyt2y3
Copy link
Member

tyt2y3 commented Nov 6, 2022

Let me think about it, I think we used to have a policy to not 'leaking SQLx types'

@billy1624
Copy link
Member

I think this can be offered under seaql-internal feature. Just like what we did at #1297

@tyt2y3
Copy link
Member

tyt2y3 commented Jan 29, 2023

Yes, I agree at least a feature guard is necessary.

@tyt2y3 tyt2y3 added this to the 0.11.x milestone Jan 29, 2023
@billy1624
Copy link
Member

Okay, I will claim the task

@billy1624 billy1624 changed the base branch from master to sqlx-error-reexport January 30, 2023 04:12
@billy1624 billy1624 merged commit 1a377be into SeaQL:sqlx-error-reexport Jan 30, 2023
tyt2y3 added a commit that referenced this pull request Jan 31, 2023
* added reexports for sqlx errors (#1181)

Co-authored-by: erhodes <erik@space-nav.com>

* Re-export SQLx error types

* Apply suggestions from code review

---------

Co-authored-by: e-rhodes <33500135+e-rhodes@users.noreply.github.com>
Co-authored-by: erhodes <erik@space-nav.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants