Skip to content

Commit

Permalink
bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
dantownsend committed Nov 9, 2022
1 parent 6211633 commit 970bef9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
Changes
=======

0.96.0
------

Added the ``auto_update`` argument to ``Column``. Its main use case is columns
like ``modified_on`` where we want the value to be updated automatically each
time the row is saved.

.. code-block:: python
class Band(Table):
name = Varchar()
popularity = Integer()
modified_on = Timestamp(
null=True,
default=None,
auto_update=datetime.datetime.now
)
# The `modified_on` column will automatically be updated to the current
# timestamp:
>>> await Band.update({
... Band.popularity: Band.popularity + 100
... }).where(
... Band.name == 'Pythonistas'
... )
It works with ``MyTable.update`` and also when using the ``save`` method on
an existing row.

-------------------------------------------------------------------------------

0.95.0
------

Expand Down
2 changes: 1 addition & 1 deletion piccolo/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VERSION__ = "0.95.0"
__VERSION__ = "0.96.0"

0 comments on commit 970bef9

Please sign in to comment.