From 5a3d9139336e0a587318c09f62e51f03b2ad8f15 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 15 Nov 2024 02:34:53 +0100 Subject: [PATCH] `core`: Don't define database functions, implement them in Rust --- .../migrations/2024-11-14-031744_meta/down.sql | 4 ---- acrate-core/migrations/2024-11-14-031744_meta/up.sql | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/acrate-core/migrations/2024-11-14-031744_meta/down.sql b/acrate-core/migrations/2024-11-14-031744_meta/down.sql index 93c97ae..d56725b 100644 --- a/acrate-core/migrations/2024-11-14-031744_meta/down.sql +++ b/acrate-core/migrations/2024-11-14-031744_meta/down.sql @@ -1,7 +1,3 @@ -DROP FUNCTION get_meta_properties; -DROP FUNCTION get_meta_links; -DROP FUNCTION get_meta_aliases; - DROP TABLE meta_properties; DROP TABLE meta_link_properties; DROP TABLE meta_links; diff --git a/acrate-core/migrations/2024-11-14-031744_meta/up.sql b/acrate-core/migrations/2024-11-14-031744_meta/up.sql index 757b530..41771cb 100644 --- a/acrate-core/migrations/2024-11-14-031744_meta/up.sql +++ b/acrate-core/migrations/2024-11-14-031744_meta/up.sql @@ -33,15 +33,3 @@ CREATE TABLE meta_properties ( PRIMARY KEY (id) ); - -CREATE FUNCTION get_meta_aliases(BPCHAR) RETURNS SETOF meta_aliases AS $$ - SELECT * FROM meta_aliases WHERE meta_aliases.pattern ILIKE $1; -$$ LANGUAGE SQL; - -CREATE FUNCTION get_meta_links(BPCHAR) RETURNS SETOF meta_links AS $$ - SELECT * FROM meta_links WHERE meta_links.pattern ILIKE $1; -$$ LANGUAGE SQL; - -CREATE FUNCTION get_meta_properties(BPCHAR) RETURNS SETOF meta_properties AS $$ - SELECT * FROM meta_properties WHERE meta_properties.pattern ILIKE $1; -$$ LANGUAGE SQL;