Overriding arithmetic methods to generate SQL is horrible.
from horrorm import D, f
d = D('foodb')
d.business_business.select(f.id == 2)
q = (f.id != 5) | (f.name *= 'Al%')
d.business_business.select(q)
(d.users * d.blogs).select(f.users.id == f.blogs.user_id)
SQL | Horror | Mnemonic
------+--------+--------------------------
= | == |
!= | != | opposite of equal
in | << |
> | > |
>= | >= |
< | < |
<= | <= |
LIKE | *= | wildcard
NOT | ~ |
AND | & |
OR | | |
JOIN | * |