-
-
Notifications
You must be signed in to change notification settings - Fork 3
evanh/fix/default implementations #533
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
base: main
Are you sure you want to change the base?
Conversation
evanh
commented
Jan 15, 2026
- attempt
- attempt to make default implementation
| .acquire_read_pool("pending_activation_max_lag") | ||
| .await | ||
| .unwrap(); | ||
| let result = sqlx::query( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this line I get this error:
the trait bound `&mut <... as Database>::Connection: Executor<'_>` is not satisfied
the full name for the type has been written to '/Users/evanhicks/code/getsentry/taskbroker/target/debug/deps/taskbroker-613d671e018d10ef.long-type-230211601191496010.txt'
consider using `--verbose` to print the full type name to the consolerustcClick for full compiler diagnostic
query.rs(188, 12): required by a bound in `sqlx::query::Query::<'q, DB, A>::execute`
inflight_activation.rs(274, 47): consider introducing a `where` clause, but there might be an alternative better way to express this requirement: ` where &mut <<Self as store::inflight_activation::InflightActivationStore>::Database as sqlx::Database>::Connection: sqlx::Executor<'_>`
I'm not sure how to fix this. Cursor was very unhelpful.
This reverts commit 5a1bf41.
|
|
||
| /// Get the size of the database in bytes | ||
| async fn db_size(&self) -> Result<u64, Error>; | ||
| type Database: Database; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a core change, it's what allowed me to have the acquire_..._conn functions in the Trait, which I need to move any function that runs an actual query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, so postgres/sqlite have an associated type which gets around the trait object problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory, yes, although see the error I posted about above that I can't get around.