fix deprecated macro sql_function

This commit is contained in:
2026-03-23 18:10:41 +08:00
parent bdb3bc49a6
commit fae30ed97a

View File

@@ -16,9 +16,12 @@ use rocket::serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256}; use sha2::{Digest, Sha256};
use std::collections::HashMap; use std::collections::HashMap;
sql_function!(fn random()); #[declare_sql_function]
sql_function!(fn floor(x: Float) -> Int4); extern "SQL" {
sql_function!(fn float4(x: Int4) -> Float); fn random() -> Text;
fn floor(x: Float) -> Int4;
fn float4(x: Int4) -> Float;
}
macro_rules! _get { macro_rules! _get {
($table:ident) => { ($table:ident) => {