mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-27 13:21:32 +00:00
Update utils.rs
This commit is contained in:
parent
49ca4da763
commit
fc300083a2
1 changed files with 1 additions and 7 deletions
|
@ -416,10 +416,7 @@ static EMAIL_REGEX: Lazy<Regex> = Lazy::new(|| {
|
|||
});
|
||||
|
||||
pub mod functions {
|
||||
use diesel::{
|
||||
pg::Pg,
|
||||
sql_types::{BigInt, Text, Timestamptz},
|
||||
};
|
||||
use diesel::sql_types::{BigInt, Text, Timestamptz};
|
||||
|
||||
sql_function! {
|
||||
fn hot_rank(score: BigInt, time: Timestamptz) -> Double;
|
||||
|
@ -437,9 +434,6 @@ pub mod functions {
|
|||
|
||||
// really this function is variadic, this just adds the two-argument version
|
||||
sql_function!(fn coalesce<T: diesel::sql_types::SqlType + diesel::sql_types::SingleValue>(x: diesel::sql_types::Nullable<T>, y: T) -> T);
|
||||
|
||||
// Use `AsText::new`
|
||||
postfix_operator!(AsText, "::text", Text, backend: Pg);
|
||||
}
|
||||
|
||||
pub const DELETED_REPLACEMENT_TEXT: &str = "*Permanently Deleted*";
|
||||
|
|
Loading…
Reference in a new issue