Skip to main content

a little orm

Project description


.. image:: 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.
.. code-block:: python

# 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
.. code-block:: python
# Lock books of author name == John
Book.select().join(Author).where(Author.name == 'John').for_update(of=Book)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

311devs_peewee-2.10.2.1.tar.gz (493.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page