Skip to content

Commit c518d20

Browse files
committed
0.4.2 bugfix
1 parent 26b4114 commit c518d20

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/subsystem/postgres/migration.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ pub(crate) fn get_effective_timeout(config: &SubsystemPostgres, provided_timeout
1919

2020
pub(crate) fn build_table_query<'a>(base_sql: &'a str, schema: &str, table: &str) -> QueryBuilder<'a, Postgres> {
2121
let mut query = QueryBuilder::new(base_sql);
22-
query.push(schema);
23-
query.push(".");
24-
query.push(table);
22+
query.push(format!("{}.{}", schema, table));
2523
query
2624
}
2725

@@ -30,8 +28,7 @@ where
3028
E: sqlx::Executor<'e, Database = Postgres>,
3129
{
3230
if let Some(seconds) = timeout_seconds {
33-
sqlx::query("SET LOCAL statement_timeout = $1")
34-
.bind(format!("{}s", seconds))
31+
sqlx::query(&format!("SET LOCAL statement_timeout = '{}s'", seconds))
3532
.execute(executor)
3633
.await?;
3734
}

0 commit comments

Comments
 (0)