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.

Files for 311devs_peewee, version 2.10.2.1
Filename, size File type Python version Upload date Hashes
Filename, size 311devs_peewee-2.10.2.1.tar.gz (493.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page