Skip to content

added reexports for sqlx errors#1181

Merged
billy1624 merged 1 commit intoSeaQL:sqlx-error-reexportfrom
junbl:sqlx-error-reexport
Jan 30, 2023
Merged

added reexports for sqlx errors#1181
billy1624 merged 1 commit intoSeaQL:sqlx-error-reexportfrom
junbl:sqlx-error-reexport

Conversation

@junbl
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@tyt2y3
Copy link
Copy Markdown
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
Copy Markdown
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 <[email protected]>

* Re-export SQLx error types

* Apply suggestions from code review

---------

Co-authored-by: e-rhodes <[email protected]>
Co-authored-by: erhodes <[email protected]>
Co-authored-by: Chris Tsang <[email protected]>
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