<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hello,<br><br></div>I think that a useful feature would be treating pony queries as sets, which can have set operations applied to them (since they are lazy).<br>
<br>Example:<br><br></div>class Blah(db.Entity):<br></div> a = Required(int)<br></div> b = Required(int)<br><br></div>query_1 = Blah.select(lambda blah: blah.a > 5)<br>query_2 = Blah.select(lambda blah: blah.b < 10)<br>
<br></div>Operations could then be possible such as:<br><br></div>query_1 | query_2<br></div>query_1 & query_2<br></div>query_1 - query_2<br><br></div>Is this possible with all SQL engines? I guess a new query object would be returned, which can then be executed as normal.<br clear="all">
<div><div><div><div><div><div><div><div><div><div><div><br>-- <br>Regards,<br><br>Matthew Bell<br>
</div></div></div></div></div></div></div></div></div></div></div></div>