[PonyORM-list] Algebra of sets

Vsevolod Novikov nnseva at gmail.com
Mon Oct 21 10:27:17 UTC 2013

Hi All,

It would be useful to implement some kind of 'algebra of sets':
intersection, union, and subtraction of sets defined by two abstract

Let I am writing a subsystem which should accept some queries A and B and
do something with it's intersection. Is it possible someway?

The particular (simplified) usecase: Let we have Users, Groups, and
Documents belonging to User (individual), or Group (shared).

We have wrote a 'user access' subsystem which restricts access to Documents
and returns some DocumentSet (query?) object (document_set_a) which refers
to all Documents belonging to this User directly or through the Group.

Also we have wrote some other subsystem, let it be 'document index', which
returns other DocumentSet (query?) object (document_set_b) which refers to
all Documents containing passed keywords.

Now we want to write user-restricted document index: the user passes us
keywords and wants to see all Documents belonging to him and containing
these keywords. So we should return a DocumentSet which is an intersection
of document_set_a and document_set_b.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20131021/43186315/attachment.html>

More information about the ponyorm-list mailing list