Upgrading to Newer Releases

Version 4.0

  • API changes:
    • Replace TinyDB.purge_tables(...) with TinyDB.drop_tables(...)
    • Replace TinyDB.purge_table(...) with TinyDB.drop_table(...)
    • Replace Table.purge() with Table.trunacte()
    • If you were using TinyDB.DEFAULT_TABLE, TinyDB.DEFAULT_TABLE_KWARGS, or TinyDB.DEFAULT_STORAGE: Use the new methods for customizing TinyDB described in How to Extend TinyDB

Version 3.0

Breaking API Changes

  • Querying (see Issue #62):
    • where('...').contains('...') has been renamed to where('...').search('...').
    • where('foo').has('bar') is replaced by either where('foo').bar or Query().foo.bar.
      • In case the key is not a valid Python identifier, array notation can be used: where('a.b.c') is now Query()['a.b.c'].
  • Checking for the existence of a key has to be done explicitely: where('foo').exists().

Version 2.0

Breaking API Changes

  • The syntax query in db is not supported any more. Use db.contains(...) instead.
  • The ConcurrencyMiddleware has been removed due to a insecure implementation (see Issue #18). Consider tinyrecord instead.

Apart from that the API remains compatible to v1.4 and prior.

For migration from v1 to v2, check out the v2.0 documentation

« Changelog