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
Hello,
I'm trying to process the collected payload from a notification. When I receive notification from PostgreSQL database, I would like to insert new data into the db.
I took the code from example
let notifications = rx
.filter_map(|m| match m {
AsyncMessage::Notification(n) => {
println!("Notification {:?}", n);
// insert_stuff(connection_parameters, n.payload()) <-- insert new data into db, but here asking for add await
future::ready(Some(n))
},
_ => future::ready(None),
})
.collect::<Vec<_>>()
.await;
Note: newbie in rust
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to process the collected payload from a notification. When I receive notification from PostgreSQL database, I would like to insert new data into the db.
I took the code from example
rust-postgres/tokio-postgres/tests/test/main.rs
Lines 736 to 769 in 98f5a11
something like this:
Note: newbie in rust
The text was updated successfully, but these errors were encountered: