Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Horrible ORM
Python Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
horrorm.py
requirements.txt
run_tests.sh
tests.py

README.md

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  | *      |
Something went wrong with that request. Please try again.