Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Horrible ORM

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 horrorm.py
Octocat-spinner-32 requirements.txt
Octocat-spinner-32 run_tests.sh
Octocat-spinner-32 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.