databases is removed, but a backwards-compatible shim is provided
SQLiteBackend and IOTableBackend are removed (shims exist), Database is a peewee model and support the functionality of both. The column backend controls the behaviour.
The database columns for activities and exchanges (nodes and edges) are now canonical; previously, we stored everything in the column data, and just used the other columns for querying. We can now also update them in peewee queries and directly from SQL.
In general, changes are backwards compatible, and most tests are unchanged. However, there are a few incompatible changes:
Database.get() -> Database.get_node(). This is unfortunate but not fixable due to how peewee works.
Modifying data in databases in general has no effect (e.g. databases[foo] = 'bar'), one needs to modify the Database object directly. You also can't create a Database from databases. The same holds true for Database.metadata.
Database.delete() -> Database.delete_data(). Needed for peewee compatibility.
There are some patterns which are also now strongly discouraged:
Database(name) -> Database.get(Database.name=name). Currently this still works but it is an ugly hack. Makes the code nicer, though...
Database._metadata. The data attributes on stored on Database instances directly.
databases
is removed, but a backwards-compatible shim is providedSQLiteBackend
andIOTableBackend
are removed (shims exist),Database
is a peewee model and support the functionality of both. The columnbackend
controls the behaviour.data
, and just used the other columns for querying. We can now also update them in peewee queries and directly from SQL.In general, changes are backwards compatible, and most tests are unchanged. However, there are a few incompatible changes:
Database.get()
->Database.get_node()
. This is unfortunate but not fixable due to how peewee works.databases
in general has no effect (e.g.databases[foo] = 'bar'
), one needs to modify theDatabase
object directly. You also can't create aDatabase
fromdatabases
. The same holds true forDatabase.metadata
.Database.delete()
->Database.delete_data()
. Needed for peewee compatibility.There are some patterns which are also now strongly discouraged:
Database(name)
->Database.get(Database.name=name)
. Currently this still works but it is an ugly hack. Makes the code nicer, though...Database._metadata
. The data attributes on stored onDatabase
instances directly.