chore (backend-rs): select_column -> column
This commit is contained in:
parent
9604093a95
commit
d6332a8adc
3 changed files with 6 additions and 6 deletions
|
@ -5,7 +5,7 @@ use crate::{
|
|||
misc::{self, user},
|
||||
model::entity::{emoji, note, note_reaction},
|
||||
};
|
||||
use sea_orm::{ColumnTrait, DbErr, EntityTrait, QueryFilter, QuerySelect, SelectColumns};
|
||||
use sea_orm::{ColumnTrait, DbErr, EntityTrait, QueryFilter, QuerySelect};
|
||||
|
||||
#[macros::errors]
|
||||
pub enum Error {
|
||||
|
@ -37,7 +37,7 @@ impl ApLike {
|
|||
let note_uri = {
|
||||
let note_uri = note::Entity::find()
|
||||
.select_only()
|
||||
.select_column(note::Column::Uri)
|
||||
.column(note::Column::Uri)
|
||||
.filter(note::Column::Id.eq(&reaction.note_id))
|
||||
.into_tuple::<Option<String>>()
|
||||
.one(db)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! In-memory relay actor id cache
|
||||
|
||||
use crate::{database::db_conn, model::entity::user};
|
||||
use sea_orm::{prelude::*, QuerySelect, SelectColumns};
|
||||
use sea_orm::{prelude::*, QuerySelect};
|
||||
use tokio::sync::OnceCell;
|
||||
|
||||
pub const USERNAME: &str = "relay.actor";
|
||||
|
@ -22,7 +22,7 @@ async fn set_id_cache() -> Result<&'static str, Error> {
|
|||
tracing::debug!("caching @relay.actor");
|
||||
let found_id = user::Entity::find()
|
||||
.select_only()
|
||||
.select_column(user::Column::Id)
|
||||
.column(user::Column::Id)
|
||||
.filter(user::Column::Username.eq(USERNAME))
|
||||
.filter(user::Column::Host.is_null())
|
||||
.into_tuple::<String>()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use crate::{cache, database::db_conn, model::entity::user};
|
||||
use chrono::Duration;
|
||||
use sea_orm::{DbErr, EntityTrait, QuerySelect, SelectColumns};
|
||||
use sea_orm::{DbErr, EntityTrait, QuerySelect};
|
||||
|
||||
#[macros::errors]
|
||||
pub enum Error {
|
||||
|
@ -26,7 +26,7 @@ pub async fn should_nyaify(reader_user_id: &str) -> Result<bool, Error> {
|
|||
|
||||
let fetched_value = user::Entity::find_by_id(reader_user_id)
|
||||
.select_only()
|
||||
.select_column(user::Column::ReadCatLanguage)
|
||||
.column(user::Column::ReadCatLanguage)
|
||||
.into_tuple::<bool>()
|
||||
.one(db_conn().await?)
|
||||
.await?
|
||||
|
|
Loading…
Reference in a new issue