aboutsummaryrefslogtreecommitdiff
path: root/libbrep
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-23 23:32:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-23 23:32:57 +0300
commitb76f47b910bd924f1384dad71043d39f5dfe1f18 (patch)
tree1dad628e1e63121d592b3c2b0ccb6b8cdd9563f6 /libbrep
parent0a66376a54b3ef4b1c754e65cc2f7d0e8b2987e8 (diff)
Cleanup some files replacing tabs with spaces
Diffstat (limited to 'libbrep')
-rw-r--r--libbrep/package-extra.sql20
1 files changed, 10 insertions, 10 deletions
diff --git a/libbrep/package-extra.sql b/libbrep/package-extra.sql
index 86f055b..fe936ff 100644
--- a/libbrep/package-extra.sql
+++ b/libbrep/package-extra.sql
@@ -26,7 +26,7 @@
--
DROP FUNCTION IF EXISTS search_packages(IN query tsquery,
IN tenant TEXT,
- IN name CITEXT);
+ IN name CITEXT);
DROP FUNCTION IF EXISTS search_latest_packages(IN query tsquery,
IN tenant TEXT);
@@ -98,10 +98,10 @@ RETURNS SETOF record AS $$
SELECT tenant, name, version_epoch, version_canonical_upstream,
version_canonical_release, version_revision,
CASE
- WHEN query IS NULL THEN 0
+ WHEN query IS NULL THEN 0
-- Weight mapping: D C B A
- ELSE ts_rank_cd('{0.05, 0.2, 0.9, 1.0}', search_index, query)
- END AS rank
+ ELSE ts_rank_cd('{0.05, 0.2, 0.9, 1.0}', search_index, query)
+ END AS rank
FROM latest_packages(search_latest_packages.tenant)
WHERE query IS NULL OR search_index @@ query;
$$ LANGUAGE SQL STABLE;
@@ -124,10 +124,10 @@ RETURNS SETOF record AS $$
SELECT tenant, name, version_epoch, version_canonical_upstream,
version_canonical_release, version_revision,
CASE
- WHEN query IS NULL THEN 0
+ WHEN query IS NULL THEN 0
-- Weight mapping: D C B A
- ELSE ts_rank_cd('{0.05, 0.2, 0.9, 1.0}', search_index, query)
- END AS rank
+ ELSE ts_rank_cd('{0.05, 0.2, 0.9, 1.0}', search_index, query)
+ END AS rank
FROM package
WHERE
(search_packages.tenant IS NULL OR tenant = search_packages.tenant) AND
@@ -146,8 +146,8 @@ RETURNS tsvector AS $$
WHEN document IS NULL THEN NULL
ELSE
setweight(to_tsvector(document.a), 'A') ||
- setweight(to_tsvector(document.b), 'B') ||
- setweight(to_tsvector(document.c), 'C') ||
- setweight(to_tsvector(document.d), 'D')
+ setweight(to_tsvector(document.b), 'B') ||
+ setweight(to_tsvector(document.c), 'C') ||
+ setweight(to_tsvector(document.d), 'D')
END
$$ LANGUAGE SQL IMMUTABLE;