Skip to content

Commit 5c29e0d

Browse files
committed
fix: ->> as alias for ->
1 parent 106906e commit 5c29e0d

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

src/operators/->.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ AS $$
4949
END;
5050
$$ LANGUAGE plpgsql;
5151

52+
5253
CREATE OPERATOR ->(
5354
FUNCTION=eql_v2."->",
5455
LEFTARG=eql_v2_encrypted,

src/operators/->>.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ AS $$
1111
DECLARE
1212
found eql_v2_encrypted;
1313
BEGIN
14-
found = eql_v2."->"(e, selector);
15-
RETURN eql_v2.ciphertext(found);
14+
-- found = eql_v2."->"(e, selector);
15+
-- RETURN eql_v2.ciphertext(found);
16+
RETURN eql_v2."->"(e, selector);
1617
END;
1718
$$ LANGUAGE plpgsql;
1819

src/operators/->>_test.sql

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ $$ LANGUAGE plpgsql;
3434

3535
--
3636
-- The ->> operator returns ciphertext matching the selector
37-
DO $$
38-
BEGIN
37+
-- NOTE: DEPRECATED BEHAVIOUR
38+
-- DO $$
39+
-- BEGIN
3940

40-
PERFORM assert_result(
41-
'Selector ->> returns all eql_v2_encrypted',
42-
'SELECT e->>''bca213de9ccce676fa849ff9c4807963''::text FROM encrypted LIMIT 1;',
43-
'mBbLGB9xHAGzLvUj-`@Wmf=IhD87n7r3ir3n!Sk6AKir_YawR=0c>pk(OydB;ntIEXK~c>V&4>)rNkf<JN7fmlO)c^iBv;-X0+3XyK5d`&&I-oeIEOcwPf<3zy');
44-
END;
45-
$$ LANGUAGE plpgsql;
41+
-- PERFORM assert_result(
42+
-- 'Selector ->> returns all eql_v2_encrypted',
43+
-- 'SELECT e->>''bca213de9ccce676fa849ff9c4807963''::text FROM encrypted LIMIT 1;',
44+
-- 'mBbLGB9xHAGzLvUj-`@Wmf=IhD87n7r3ir3n!Sk6AKir_YawR=0c>pk(OydB;ntIEXK~c>V&4>)rNkf<JN7fmlO)c^iBv;-X0+3XyK5d`&&I-oeIEOcwPf<3zy');
45+
-- END;
46+
-- $$ LANGUAGE plpgsql;
4647

4748

4849
--

0 commit comments

Comments
 (0)