Skip to content

v3.0.0

Choose a tag to compare

@nhumrich nhumrich released this 15 Oct 22:34
· 57 commits to main since this release

Breaking Changes

This release makes the update() API consistent with insert() by accepting keyword arguments.

Helper Function

Before:

update('users', {'name': 'Bob'}, 123)

After:

update('users', 123, name='Bob', age=35)

Query Builder

Before:

Users.update({'name': 'Bob'}).where(Users.id == 123)

After:

Users.update(name='Bob', age=35).where(Users.id == 123)

Migration Guide

  • For helper function: Move id parameter before values, unpack dict to kwargs
  • For query builder: Unpack dict to kwargs
  • Dict unpacking still works: update('users', 123, **my_dict) or Users.update(**my_dict)