Обновить зависимости проекта
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use sqlx::{
|
||||
PgPool,
|
||||
AssertSqlSafe, PgPool,
|
||||
postgres::{PgConnectOptions, PgPoolOptions},
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ impl PostgresRegistry {
|
||||
.await?;
|
||||
|
||||
if let Some(schema) = schema {
|
||||
sqlx::query(&format!("set search_path to {schema}"))
|
||||
sqlx::query(AssertSqlSafe(format!("set search_path to {schema}")))
|
||||
.execute(&pool)
|
||||
.await?;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ impl PostgresRegistry {
|
||||
group by 1
|
||||
order by 1 asc"
|
||||
);
|
||||
let rows = sqlx::query(&sql)
|
||||
let rows = sqlx::query(sqlx::AssertSqlSafe(sql))
|
||||
.bind(query.workspace_id.as_str())
|
||||
.bind(query.created_after)
|
||||
.bind(
|
||||
|
||||
@@ -245,7 +245,9 @@ impl TestDatabase {
|
||||
let schema = crank_test_support::unique_schema_name("test_registry");
|
||||
|
||||
admin_pool
|
||||
.execute(sqlx::query(&format!("create schema {schema}")))
|
||||
.execute(sqlx::query(sqlx::AssertSqlSafe(format!(
|
||||
"create schema {schema}"
|
||||
))))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -267,10 +269,10 @@ impl TestDatabase {
|
||||
|
||||
pub(super) async fn cleanup(&self) {
|
||||
self.admin_pool
|
||||
.execute(sqlx::query(&format!(
|
||||
.execute(sqlx::query(sqlx::AssertSqlSafe(format!(
|
||||
"drop schema if exists {} cascade",
|
||||
self.schema
|
||||
)))
|
||||
))))
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user