Skip to content

ORE Operators #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
525 changes: 525 additions & 0 deletions sql/015-operators-eq.sql

Large diffs are not rendered by default.

210 changes: 0 additions & 210 deletions sql/015-operators-unique.sql

This file was deleted.

27 changes: 26 additions & 1 deletion sql/016-operators-match.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,27 @@ CREATE OPERATOR @>(
);


-- ------------------------------------------------------------------------------------

DROP OPERATOR IF EXISTS @> (cs_match_index_v1, cs_encrypted_v1);
DROP FUNCTION IF EXISTS cs_encrypted_contains_v1(a cs_match_index_v1, b cs_encrypted_v1);

CREATE FUNCTION cs_encrypted_contains_v1(a cs_match_index_v1, b cs_encrypted_v1)
RETURNS boolean AS $$
SELECT a @> cs_match_v1(b);
$$ LANGUAGE SQL;

CREATE OPERATOR @>(
PROCEDURE="cs_encrypted_contains_v1",
LEFTARG=cs_match_index_v1,
RIGHTARG=cs_encrypted_v1,
RESTRICT = eqsel,
JOIN = eqjoinsel,
HASHES,
MERGES
);


-----------------------------------------------------------------------------


DROP OPERATOR IF EXISTS <@ (cs_encrypted_v1, cs_encrypted_v1);
Expand Down Expand Up @@ -103,3 +123,8 @@ CREATE OPERATOR <@ (
HASHES,
MERGES
);


-----------------------------------------------------------------------------------------


Loading