Upgrading to Newer Releases

Version 4.0

  • API changes:
    • ReplaceTinyDB.purge_tables(...) withTinyDB.drop_tables(...)
    • ReplaceTinyDB.purge_table(...) withTinyDB.drop_table(...)
    • ReplaceTable.purge() withTable.truncate()
    • ReplaceTinyDB(default_table='name') withTinyDB.default_table_name='name'
    • ReplaceTinyDB(table_class=Class) withTinyDB.table_class=Class
    • If you were usingTinyDB.DEFAULT_TABLE,TinyDB.DEFAULT_TABLE_KWARGS,orTinyDB.DEFAULT_STORAGE: Use the new methods for customizing TinyDBdescribed inHow to Extend TinyDB

Version 3.0

Breaking API Changes

  • Querying (seeIssue #62):
    • where('...').contains('...') has been renamed towhere('...').search('...').
    • where('foo').has('bar') is replaced by eitherwhere('foo').bar orQuery().foo.bar.
      • In case the key is not a valid Python identifier, arraynotation can be used:where('a.b.c') is nowQuery()['a.b.c'].
  • Checking for the existence of a key has to be done explicitly:where('foo').exists().

Version 2.0

Breaking API Changes

  • The syntaxqueryindb is not supported any more. Usedb.contains(...)instead.
  • TheConcurrencyMiddleware has been removed due to a insecure implementation(seeIssue #18). Considertinyrecord instead.

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

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

« Changelog