Skip to content

Commit acec98f

Browse files
committed
store: Use diesel_async::RunQueryDsl in relational/index
1 parent ed4f9b9 commit acec98f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

store/postgres/src/relational/index.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ use std::collections::HashMap;
44
use std::fmt::{Display, Write};
55
use std::sync::Arc;
66

7+
use diesel::sql_query;
78
use diesel::sql_types::{Bool, Text};
8-
use diesel::{sql_query, RunQueryDsl};
9+
use diesel_async::RunQueryDsl;
910
use graph::components::store::StoreError;
1011
use graph::itertools::Itertools;
1112
use graph::prelude::{
@@ -852,7 +853,8 @@ impl IndexList {
852853
.bind::<Text, _>(namespace.to_string())
853854
.bind::<Text, _>(table_name)
854855
.bind::<Text, _>(index_name.clone())
855-
.get_results::<IndexInfo>(conn)?
856+
.get_results::<IndexInfo>(conn)
857+
.await?
856858
.into_iter()
857859
.map(|ii| ii.into())
858860
.collect::<Vec<IndexInfo>>();
@@ -865,9 +867,9 @@ impl IndexList {
865867
namespace.to_string(),
866868
index_name
867869
));
868-
drop_query.execute(conn)?;
870+
drop_query.execute(conn).await?;
869871
}
870-
sql_query(create_query).execute(conn)?;
872+
sql_query(create_query).execute(conn).await?;
871873
}
872874
}
873875
}

0 commit comments

Comments
 (0)