Replies: 2 comments
-
https://github.com/launchbadge/sqlx/tree/master/examples/postgres/mockable-todos |
Beta Was this translation helpful? Give feedback.
0 replies
-
I hit the same issue while trying to implement a new database type. What is the reason why these traits are sealed? Given that sqlx doesn't even use unsafe code (unless compiled with sqlite), I don't see the benefit of doing so. And it's a total roadblock when trying to implement the Database trait from outside of the crate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
For my project I need to mock a database for testing purposes.
My original idea was to create a MockDb structure and implement sqlx::Database trait for it but looks like it's not possible because Row and Column traits are sealed.
Is there a proper way to do database mocking.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions