You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm working on a job queue in my project, which involves NOTIFY/LISTEN.
Ideally, I would like to react to notifications and reuse the same Postgres connection when I'm processing this notification.
Describe the solution you'd like
PgListener already implements Executor, which helps executing arbitrary queries with it, but my database abstraction would benefit from accessing the &mut PgConnection.
PgListener has a connection private method which gives that, but maybe it should just implement Acquire?
Describe alternatives you've considered
Opening a second connection, which feels wrong as when I'm processing notifications, the PgListener connection sits idle anyway.
Additional context -
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm working on a job queue in my project, which involves NOTIFY/LISTEN.
Ideally, I would like to react to notifications and reuse the same Postgres connection when I'm processing this notification.
Describe the solution you'd like
PgListener already implements Executor, which helps executing arbitrary queries with it, but my database abstraction would benefit from accessing the
&mut PgConnection
.PgListener has a
connection
private method which gives that, but maybe it should just implementAcquire
?Describe alternatives you've considered
Opening a second connection, which feels wrong as when I'm processing notifications, the PgListener connection sits idle anyway.
Additional context
-
The text was updated successfully, but these errors were encountered: