Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 923 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 923 Bytes

Horrorm - The Horrible ORM That's Hard to Pronounce

Overriding arithmetic methods to generate SQL is horrible.

Is it safe? Build Status

Usage

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)

Cheat Sheet

SQL   | Horror | Mnemonic
------+--------+--------------------------
=     | ==     |
!=    | !=     | opposite of equal
in    | <<     |
>     | >      |
>=    | >=     |
<     | <      |
<=    | <=     |
LIKE  | *=     | wildcard
NOT   | ~      |
AND   | &      |
OR    | |      |
JOIN  | *      |