chore(*.sql): use sql-formatter for sql formatting

This commit is contained in:
Cory Dransfeldt 2025-06-14 17:10:41 -07:00
parent 753f3433ce
commit a650f1d3e8
No known key found for this signature in database
63 changed files with 4432 additions and 2358 deletions

View file

@ -1,21 +1,24 @@
DROP FUNCTION IF EXISTS search_optimized_index(text, integer, integer, text[]);
DROP FUNCTION IF EXISTS search_optimized_index (text, integer, integer, text[]);
CREATE FUNCTION search_optimized_index(search_query text, page_size integer, page_offset integer, sections text[])
RETURNS TABLE(
result_id integer,
url text,
title text,
description text,
tags text[],
genre_name text,
genre_url text,
section text,
type text,
total_plays text,
rank real,
total_count bigint
)
AS $$
CREATE FUNCTION search_optimized_index (
search_query text,
page_size integer,
page_offset integer,
sections text[]
) RETURNS TABLE (
result_id integer,
url text,
title text,
description text,
tags text[],
genre_name text,
genre_url text,
section text,
type text,
total_plays text,
rank real,
total_count bigint
) AS $$
BEGIN
RETURN QUERY
SELECT
@ -42,5 +45,4 @@ BEGIN
rank DESC
LIMIT page_size OFFSET page_offset;
END;
$$
LANGUAGE plpgsql;
$$ LANGUAGE plpgsql;