Skip to content

Commit e3686b1

Browse files
committed
chore:
1 parent eddaece commit e3686b1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/operators/~~.sql

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
-- DROP FUNCTION IF EXISTS eql_v1.match(a eql_v1_encrypted, b eql_v1_encrypted);
1717

18-
CREATE FUNCTION eql_v1.match(a eql_v1_encrypted, b eql_v1_encrypted)
18+
CREATE FUNCTION eql_v1.like(a eql_v1_encrypted, b eql_v1_encrypted)
1919
RETURNS boolean AS $$
2020
SELECT eql_v1.match(a) @> eql_v1.match(b);
2121
$$ LANGUAGE SQL;
@@ -31,7 +31,7 @@ CREATE FUNCTION eql_v1."~~"(a eql_v1_encrypted, b eql_v1_encrypted)
3131
RETURNS boolean
3232
AS $$
3333
BEGIN
34-
RETURN eql_v1.match(a, b);
34+
RETURN eql_v1.like(a, b);
3535
END;
3636
$$ LANGUAGE plpgsql;
3737

@@ -65,7 +65,7 @@ CREATE FUNCTION eql_v1."~~"(a eql_v1_encrypted, b jsonb)
6565
RETURNS boolean
6666
AS $$
6767
BEGIN
68-
RETURN eql_v1.match(a, b::eql_v1_encrypted);
68+
RETURN eql_v1.like(a, b::eql_v1_encrypted);
6969
END;
7070
$$ LANGUAGE plpgsql;
7171

@@ -100,7 +100,7 @@ CREATE FUNCTION eql_v1."~~"(a jsonb, b eql_v1_encrypted)
100100
RETURNS boolean
101101
AS $$
102102
BEGIN
103-
RETURN eql_v1.match(a::eql_v1_encrypted, b);
103+
RETURN eql_v1.like(a::eql_v1_encrypted, b);
104104
END;
105105
$$ LANGUAGE plpgsql;
106106

src/operators/~~_test.sql

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ DECLARE
8787
e := create_encrypted_json(i, 'm');
8888

8989
PERFORM assert_result(
90-
format('eql_v1.match(eql_v1_encrypted, eql_v1_encrypted)', i),
91-
format('SELECT e FROM encrypted WHERE eql_v1.match(e, %L);', e));
90+
format('eql_v1.like(eql_v1_encrypted, eql_v1_encrypted)', i),
91+
format('SELECT e FROM encrypted WHERE eql_v1.like(e, %L);', e));
9292

9393
end loop;
9494

9595
-- Partial match
9696
e := create_encrypted_json('m')::jsonb || '{"m": [10, 11]}';
9797

9898
PERFORM assert_result(
99-
'eql_v1.match(eql_v1_encrypted, eql_v1_encrypted)',
100-
format('SELECT e FROM encrypted WHERE eql_v1.match(e, %L);', e));
99+
'eql_v1.like(eql_v1_encrypted, eql_v1_encrypted)',
100+
format('SELECT e FROM encrypted WHERE eql_v1.like(e, %L);', e));
101101

102102
END;
103103
$$ LANGUAGE plpgsql;

0 commit comments

Comments
 (0)