1
0

Upgrade to sqlx 0.7.2 (#736)

* Update to sqlx 0.7.2

* Somehow missed one (and remove queries from other branch)
This commit is contained in:
Jackson Kruger
2023-10-23 14:30:39 -05:00
committed by GitHub
parent 9a8f3d7bad
commit 8803e11945
358 changed files with 8352 additions and 7467 deletions

View File

@@ -42,7 +42,7 @@ impl DonationUrl {
&platform_ids[..],
&urls[..],
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
Ok(())
@@ -99,7 +99,7 @@ impl GalleryItem {
&descriptions[..] as &[Option<String>],
&orderings[..]
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
Ok(())
@@ -131,7 +131,7 @@ impl ModCategory {
&category_ids[..],
&is_additionals[..]
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
Ok(())
@@ -332,7 +332,7 @@ impl Project {
self.color.map(|x| x as i32),
self.monetization_status.as_str(),
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
Ok(())
@@ -343,7 +343,7 @@ impl Project {
transaction: &mut sqlx::Transaction<'_, sqlx::Postgres>,
redis: &RedisPool,
) -> Result<Option<()>, DatabaseError> {
let project = Self::get_id(id, &mut *transaction, redis).await?;
let project = Self::get_id(id, &mut **transaction, redis).await?;
if let Some(project) = project {
Project::clear_cache(id, project.inner.slug, Some(true), redis).await?;
@@ -355,7 +355,7 @@ impl Project {
",
id as ProjectId
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
sqlx::query!(
@@ -365,7 +365,7 @@ impl Project {
",
id as ProjectId
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
sqlx::query!(
@@ -375,7 +375,7 @@ impl Project {
",
id as ProjectId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
sqlx::query!(
@@ -385,7 +385,7 @@ impl Project {
",
id as ProjectId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
sqlx::query!(
@@ -395,7 +395,7 @@ impl Project {
",
id as ProjectId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
sqlx::query!(
@@ -405,7 +405,7 @@ impl Project {
",
id as ProjectId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
for version in project.versions {
@@ -418,7 +418,7 @@ impl Project {
",
id as ProjectId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
sqlx::query!(
@@ -429,7 +429,7 @@ impl Project {
",
id as ProjectId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
models::Thread::remove_full(project.thread_id, transaction).await?;
@@ -441,7 +441,7 @@ impl Project {
",
id as ProjectId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
models::TeamMember::clear_cache(project.inner.team_id, redis).await?;
@@ -454,7 +454,7 @@ impl Project {
",
project.inner.team_id as TeamId,
)
.fetch_many(&mut *transaction)
.fetch_many(&mut **transaction)
.try_filter_map(|e| async { Ok(e.right().map(|x| UserId(x.user_id))) })
.try_collect::<Vec<_>>()
.await?;
@@ -468,7 +468,7 @@ impl Project {
",
project.inner.team_id as TeamId,
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
Ok(Some(()))
@@ -787,7 +787,7 @@ impl Project {
id as ProjectId,
&*crate::models::projects::VersionStatus::iterator().filter(|x| x.is_hidden()).map(|x| x.to_string()).collect::<Vec<String>>()
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
Ok(())
@@ -812,7 +812,7 @@ impl Project {
id as ProjectId,
&*crate::models::projects::VersionStatus::iterator().filter(|x| x.is_hidden()).map(|x| x.to_string()).collect::<Vec<String>>()
)
.execute(&mut *transaction)
.execute(&mut **transaction)
.await?;
Ok(())