Skip to content

Conversation

@evanh
Copy link
Member

@evanh evanh commented Jan 15, 2026

  • attempt
  • attempt to make default implementation

.acquire_read_pool("pending_activation_max_lag")
.await
.unwrap();
let result = sqlx::query(
Copy link
Member Author

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.

evanh added 2 commits January 15, 2026 16:27
This reverts commit 5a1bf41.

/// Get the size of the database in bytes
async fn db_size(&self) -> Result<u64, Error>;
type Database: Database;
Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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.

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.

3 participants