Skip to content

Commit f919fb3

Browse files
authored
Merge pull request #83 from cipherstash/CIP-1148/i-dont-want-to-talk-about-it
ORE Operators
2 parents 2ee50af + deab454 commit f919fb3

11 files changed

+1678
-397
lines changed

sql/015-operators-eq.sql

Lines changed: 525 additions & 0 deletions
Large diffs are not rendered by default.

sql/015-operators-unique.sql

Lines changed: 0 additions & 210 deletions
This file was deleted.

sql/016-operators-match.sql

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,27 @@ CREATE OPERATOR @>(
4545
);
4646

4747

48-
-- ------------------------------------------------------------------------------------
48+
49+
DROP OPERATOR IF EXISTS @> (cs_match_index_v1, cs_encrypted_v1);
50+
DROP FUNCTION IF EXISTS cs_encrypted_contains_v1(a cs_match_index_v1, b cs_encrypted_v1);
51+
52+
CREATE FUNCTION cs_encrypted_contains_v1(a cs_match_index_v1, b cs_encrypted_v1)
53+
RETURNS boolean AS $$
54+
SELECT a @> cs_match_v1(b);
55+
$$ LANGUAGE SQL;
56+
57+
CREATE OPERATOR @>(
58+
PROCEDURE="cs_encrypted_contains_v1",
59+
LEFTARG=cs_match_index_v1,
60+
RIGHTARG=cs_encrypted_v1,
61+
RESTRICT = eqsel,
62+
JOIN = eqjoinsel,
63+
HASHES,
64+
MERGES
65+
);
66+
67+
68+
-----------------------------------------------------------------------------
4969

5070

5171
DROP OPERATOR IF EXISTS <@ (cs_encrypted_v1, cs_encrypted_v1);
@@ -103,3 +123,8 @@ CREATE OPERATOR <@ (
103123
HASHES,
104124
MERGES
105125
);
126+
127+
128+
-----------------------------------------------------------------------------------------
129+
130+

0 commit comments

Comments
 (0)