Peewee v2.5.0 Release Notes
-
๐ There are a couple new features so I thought I'd bump to 2.5.x. One change Postgres users may be happy to see is the use of
INSERT ... RETURNING
to perform inserts. This should definitely speed up inserts for Postgres, since an extra query is no longer needed to get the new auto-generated primary key.โ I also added a new context manager/decorator that allows you to use a different database for the duration of the wrapped block.
๐ Bugs fixed
- #534, CSV utils was erroneously stripping the primary key from CSV data.
- #537, fix upserts when using
insert_many
. - โช #541, respect
autorollback
withPostgresqlExtDatabase
. Thanks @davidmcclure. - #551, fix for QueryResultWrapper's implementation of the iterator protocol.
- #554, allow SQLite journal_mode to be set at run-time.
- ๐ Fixed case-sensitivity issue with
DataSet
.
๐ New features
- โ Added support for CAST expressions.
- โ Added a hook for extending Node with custom methods.
JOIN_<type>
becameJOIN.<type>
, e.g..join(JOIN.LEFT_OUTER)
.OP_<code>
becameOP.<code>
.- ๐ #556, allowed using
+
and-
prefixes to indicate ascending/descending ordering. - โ #550, added Database.initialize_connection() hook.
- #549, bind selected columns to a particular model. Thanks @jhorman, nice PR!
- โ #531, support for swapping databases at run-time via Using.
- ๐ #530, support for SQLCipher and Python3.
- ๐ New
RowIDField
forsqlite_ext
playhouse module. This field can be used to interact with SQLiterowid
fields. - โ Added
LateralJoin
helper to thepostgres_ext
playhouse module. - ๐ New example blog app.