Skip to content

Commit 7c3407e

Browse files
committed
chore(ore): condense null logic
1 parent 2e09010 commit 7c3407e

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

sql/000-ore.sql

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,7 @@ CREATE FUNCTION compare_ore_64_8_v1_term(a ore_64_8_v1_term, b ore_64_8_v1_term)
2323

2424
indicator smallint := 0;
2525
BEGIN
26-
IF a IS NULL AND b IS NULL THEN
27-
RETURN NULL;
28-
END IF;
29-
30-
IF a IS NULL THEN
31-
RETURN NULL;
32-
END IF;
33-
34-
IF b IS NULL THEN
26+
IF a IS NULL OR b IS NULL THEN
3527
RETURN NULL;
3628
END IF;
3729

@@ -239,15 +231,7 @@ RETURNS integer AS $$
239231
DECLARE
240232
cmp_result integer;
241233
BEGIN
242-
IF a IS NULL AND b IS NULL THEN
243-
RETURN NULL;
244-
END IF;
245-
246-
IF a IS NULL THEN
247-
RETURN NULL;
248-
END IF;
249-
250-
IF b IS NULL THEN
234+
IF a IS NULL OR b IS NULL THEN
251235
RETURN NULL;
252236
END IF;
253237

0 commit comments

Comments
 (0)