Connecting using a Database URL Connecting using a Database URL The playhouse module Database URL provides a helper connect() function that accepts a database URL and return...
Query operators Query operators The following types of comparisons are supported by peewee: Comparison Meaning == x equals y < x is less than y <= x is less than or equal t...
Hacks Hacks Collected hacks using peewee. Have a cool hack you’d like to share? Open an issue on GitHub or contact me . Optimistic Locking Top object per group Top N objec...
Window functions Ordered Windows Partitioned Windows Bounded windows Filtered Aggregates Reusing Window Definitions Multiple window definitions Frame types: RANGE vs ROWS vs ...
Postgresql Extensions JSON Support hstore support Using hstore Interval support Server-side cursors Full-text search postgres_ext API notes Postgresql Extensions The pos...
Model Definitions Model Definitions To begin working with the data, we’ll define the model classes that correspond to the tables in the diagram. Note In some cases we explici...
Connecting using a Database URL Connecting using a Database URL The playhouse module Database URL provides a helper connect() function that accepts a database URL and return...
SQL Helper SQL Helper There are times when you may want to simply pass in some arbitrary sql. You can do this using the special SQL class. One use-case is when referencing an...
Security and SQL Injection Security and SQL Injection By default peewee will parameterize queries, so any parameters passed in by theuser will be escaped. The only exception to...
MySQL Extensions MySQL Extensions Peewee provides an alternate database implementation for using the mysql-connector driver. The implementation can be found in playhouse.mysql...