File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 15
15
16
16
-- DROP FUNCTION IF EXISTS eql_v1.match(a eql_v1_encrypted, b eql_v1_encrypted);
17
17
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)
19
19
RETURNS boolean AS $$
20
20
SELECT eql_v1 .match (a) @> eql_v1 .match (b);
21
21
$$ LANGUAGE SQL;
@@ -31,7 +31,7 @@ CREATE FUNCTION eql_v1."~~"(a eql_v1_encrypted, b eql_v1_encrypted)
31
31
RETURNS boolean
32
32
AS $$
33
33
BEGIN
34
- RETURN eql_v1 .match (a, b);
34
+ RETURN eql_v1 .like (a, b);
35
35
END;
36
36
$$ LANGUAGE plpgsql;
37
37
@@ -65,7 +65,7 @@ CREATE FUNCTION eql_v1."~~"(a eql_v1_encrypted, b jsonb)
65
65
RETURNS boolean
66
66
AS $$
67
67
BEGIN
68
- RETURN eql_v1 .match (a, b::eql_v1_encrypted);
68
+ RETURN eql_v1 .like (a, b::eql_v1_encrypted);
69
69
END;
70
70
$$ LANGUAGE plpgsql;
71
71
@@ -100,7 +100,7 @@ CREATE FUNCTION eql_v1."~~"(a jsonb, b eql_v1_encrypted)
100
100
RETURNS boolean
101
101
AS $$
102
102
BEGIN
103
- RETURN eql_v1 .match (a::eql_v1_encrypted, b);
103
+ RETURN eql_v1 .like (a::eql_v1_encrypted, b);
104
104
END;
105
105
$$ LANGUAGE plpgsql;
106
106
Original file line number Diff line number Diff line change @@ -87,17 +87,17 @@ DECLARE
87
87
e := create_encrypted_json(i, ' m' );
88
88
89
89
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));
92
92
93
93
end loop;
94
94
95
95
-- Partial match
96
96
e := create_encrypted_json(' m' )::jsonb || ' {"m": [10, 11]}' ;
97
97
98
98
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));
101
101
102
102
END;
103
103
$$ LANGUAGE plpgsql;
You can’t perform that action at this time.
0 commit comments