From 87e86825f4d4b868dab9cbb73e816a81c3fb6109 Mon Sep 17 00:00:00 2001 From: dullbananas Date: Mon, 10 Jun 2024 14:13:12 -0700 Subject: [PATCH] Update utils.rs --- crates/db_schema/src/utils.rs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index 4267bb360..4e7ed2eb9 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -340,12 +340,18 @@ fn establish_connection(config: &str) -> BoxFuture = Lazy::new(|| { }); pub mod functions { - use diesel::sql_types::{BigInt, Text, Timestamptz}; + use diesel::sql_types::{BigInt, Bool, Text, Timestamptz}; sql_function! { #[sql_name = "r.hot_rank"] @@ -496,6 +502,8 @@ pub mod functions { // really this function is variadic, this just adds the two-argument version sql_function!(fn coalesce(x: diesel::sql_types::Nullable, y: T) -> T); + + sql_function(fn set_config(setting_name: Text, new_value: Text, is_local: Bool) -> Text); } pub const DELETED_REPLACEMENT_TEXT: &str = "*Permanently Deleted*";