pkgsrc/databases/py-peewee
adam 77228ff7e1 py-peewee: updated to 3.15.0
3.15.0

Rollback behavior change in commit ab43376697. 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 the rowcount (as opposed to the cursor's lastrowid). The rowcount behavior is still available chaining the as_rowcount() method:

# NOTE: this change only affects MySQL or Sqlite.
db = MySQLDatabase(...)

# Previously, bulk inserts of the following forms would return the rowcount.
query = User.insert_many(...)  # Bulk insert.
query = User.insert_from(...)  # Bulk insert (INSERT INTO .. SELECT FROM).

# Previous behavior (peewee 3.12 - 3.14.10):
# rows_inserted = query.execute()

# New behavior:
last_id = query.execute()

# To get the old behavior back:
rows_inserted = query.as_rowcount().execute()
This release contains a fix for a long-standing request to allow data-modifying queries to support CTEs. CTEs are now supported for use with INSERT, DELETE and UPDATE queries.

Additionally, this release adds better support for using the new RETURNING syntax with Sqlite automatically. Specify returing_clause=True when initializing your SqliteDatabase and all bulk inserts will automatically specify a RETURNING clause, returning the newly-inserted primary keys. This functionality requires Sqlite 3.35 or newer.

Smaller changes:

Add shortcuts.insert_where() helper for generating conditional INSERT with a bit less boilerplate.
Fix bug in test_utils.count_queres() which could erroneously include pool events such as connect/disconnect, etc.
2022-06-17 17:35:22 +00:00
..
patches py-peewee: updated to 3.14.0 2020-11-09 09:29:12 +00:00
ALTERNATIVES *: Remove manual page entries from ALTERNATIVES files. 2020-05-06 11:16:45 +00:00
DESCR
distinfo py-peewee: updated to 3.15.0 2022-06-17 17:35:22 +00:00
Makefile py-peewee: updated to 3.15.0 2022-06-17 17:35:22 +00:00
MESSAGE
PLIST py-peewee: updated to 3.14.7 2021-10-27 15:25:37 +00:00