Changelog History
Page 1
-
v3.15.4 Changes
- ๐ป Raise an exception in
ReconnectMixin
if connection is lost while inside a transaction (if the transaction was interrupted presumably some changes were lost and explicit intervention is needed). - โ Add
db.Model
property to reduce boilerplate. - โ Add support for running
prefetch()
queries with joins instead of subqueries (this helps overcome a MySQL limitation about applying LIMITs to a subquery). - โ Add SQL
AVG
to whitelist to avoid coercing by default. - ๐ Allow arbitrary keywords in metaclass constructor, #2627
- โ Add a
pyproject.toml
to silence warnings from newer pips whenwheel
package is not available.
๐ This release has a small helper for reducing boilerplate in some cases by exposing a base model class as an attribute of the database instance.
- ๐ป Raise an exception in
-
v3.15.3 Changes
- โ Add
scalars()
query method (complementsscalar()
), roughly equivalent to writing[t[0] for t in query.tuples()]
. - Small doc improvements
- ๐ Fix and remove some flaky test assertions with Sqlite INSERT + RETURNING.
- ๐ Fix innocuous failing Sqlite test on big-endian machines.
- โ Add
-
v3.15.2 Changes
- ๐ Fix bug where field-specific conversions were being applied to the pattern used for LIKE / ILIKE operations. Refs #2609
- Fix possible infinite loop when accidentally invoking the
__iter__
method on certainColumn
subclasses. Refs #2606 - โ Add new helper for specifying which Model a particular selected column-like should be bound to, in queries with joins that select from multiple sources.
-
v3.15.1 Changes
- ๐ Fix issue introduced in Sqlite 3.39.0 regarding the propagation of column subtypes in subqueries.
- ๐ Fix bug where cockroachdb server version was not set when beginning a transaction on an unopened database.
-
v3.15.0 Changes
โช Rollback behavior change in commit ab43376697 (GH #2026). Peewee will no longer automatically return the cursor
rowcount
for certain bulk-inserts. This should only affect users of MySQL and Sqlite who relied on a bulk INSERT returning therowcount
(as opposed to the cursor'slastrowid
). Therowcount
behavior is still available chaining theas_rowcount()
method: -
v3.14.10 Changes
- โ Add shortcut for conditional insert using sub-select, see #2528
- Add convenience
left_outer_join()
method to query. - โ Add
selected_columns
property to Select queries. - โ Add
name
property to Alias instances. - ๐ Fix regression in tests introduced by change to DataSet in 3.14.9.
-
v3.14.9 Changes
- ๐ Allow calling
table_exists()
with a model-class, refs - Improve
is_connection_usable()
method ofMySQLDatabase
class. - ๐ Better support for VIEWs with
playhouse.dataset.DataSet
and sqlite-web. - ๐ Support INSERT / ON CONFLICT in
playhosue.kv
for newer Sqlite. - โ Add
ArrayField.contained_by()
method, a corollary tocontains()
and thecontains_any()
methods. - ๐ Support cyclical foreign-key relationships in reflection/introspection, and also for sqlite-web.
- โ Add magic methods for FTS5 field to optimize, rebuild and integrity check the full-text index.
- โ Add fallbacks in
setup.py
in the event distutils is not available.
- ๐ Allow calling
-
v3.14.8 Changes
Back-out all changes to automatically use RETURNING for
SqliteExtDatabase
,CSqliteExtDatabase
andAPSWDatabase
. The issue I found is that when a RETURNING cursor is not fully-consumed, any parent SAVEPOINT (and possibly ๐ transaction) would not be able to be released. Since this is a backwards-incompatible change, I am going to back it out for now.Returning clause can still be specified for Sqlite, however it just needs to be done so manually rather than having it applied automatically.
-
v3.14.7 Changes
๐ Fix bug in APSW extension with Sqlite 3.35 and newer, due to handling of last insert rowid with RETURNING. Refs #2479.
-
v3.14.6 Changes
Fix pesky bug in new
last_insert_id()
on theSqliteExtDatabase
.