Advertisement
NLinker

async try_join_all example

Dec 23rd, 2019
829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.93 KB | None | 0 0
  1.     let stmts = future::try_join_all(vec![
  2.         client.prepare(&format!(
  3.             "select * from {} where not_deleted = 't'",
  4.             ManagedTargetMountRecord::table_name()
  5.         )),
  6.         client.prepare(&format!(
  7.             "select * from {} where not_deleted = 't'",
  8.             StratagemConfiguration::table_name()
  9.         )),
  10.         client.prepare(&format!(
  11.             "select * from {} where not_deleted = 't'",
  12.             LnetConfigurationRecord::table_name()
  13.         )),
  14.         client.prepare(&format!(
  15.             "select * from {} where not_deleted = 't'",
  16.             VolumeNodeRecord::table_name()
  17.         )),
  18.         client.prepare(&format!(
  19.             "select * from {} where not_deleted = 't'",
  20.             OstPoolRecord::table_name()
  21.         )),
  22.         client.prepare(&format!(
  23.             "select * from {}",
  24.             OstPoolOstsRecord::table_name()
  25.         )),
  26.     ])
  27.     .await?;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement