311devs_peewee

a little orm


License
MIT
Install
pip install 311devs_peewee==2.10.1.3

Documentation

http://media.charlesleifer.com/blog/photos/p1423749536.32.png

peewee

This is just peewee-2.10.2 <https://github.com/coleifer/peewee> with some changes we need:

  • Simple LEFT JOIN LATERAL. No need make subquery, just join to model.
# make some compound select query
subq = ModelB.select(ModelB.id).where(ModelB.id > ModelA.id).limit(1)
# make query lateral joining subquery
ModelA.select(ModelA, subq.c.id).join(subq, join_type=JOIN.LATERAL)
  • Add off argument to for_update method