Support for INTERSECT?
See original GitHub issueHi, is it possible to add support for intersect? eg:
rule_engine.Rule('role INTERSECT {"R1", "R2"}').matches({"role": ["R1"]})
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MySQL: INTERSECT Operator - TechOnTheNet
This MySQL tutorial explains how to use the INTERSECT operator with syntax and examples. Although there is no INTERSECT operator in MySQL, you...
Read more >MySQL 8.0 Reference Manual :: 13.2.8 INTERSECT Clause
INTERSECT limits the result from multiple query blocks to those rows which ... For INTERSECT ALL , the maximum supported number of duplicates...
Read more >Support - Intersect Systems
Two support program options are available for Intersect software users. These programs provide software updates, telephone support, continuing training, ...
Read more >How to Emulate The MySQL INTERSECT Operator
Note that MySQL does not support the INTERSECT operator. This tutorial introduces you to how to emulate the INTERSECT operator in MySQL using...
Read more >SQL Intersect: Your Complete Guide to Using The Operator
Wondering what is the SQL INTERSECT Operator, how do you use it, and what are the operator's uses? Learn all of it with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Alright this is done in the v3.1.0 release which is now on PyPi. You can use the new SET data type along with the bitwise and operator
&
. For example:Both the ARRAY and STRING data types have a
to_set
attribute that will convert them as well.I’ve started the work for a SET data type which would support the bitwise operators and, or and xor (
&
,|
, and^
respectively). Usage of the bitwise and operator will have the desired effect of checking for the intersection of two SETs just like it does in Python. There will be accompanying attributes for converting arrays and strings into sets. This will be in the 3.1 release (probably) in the next couple of weeks. A preview is available in the feat/v3.1 branch.I’d still like to have array comprehension support, but that can come later. These two features don’t seem like they need to be mutually exclusive and a SET data type will solve the problem at hand more directly.