mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 13:47:13 -05:00
- mtime is tracked on each key individually, which will allow
merging of config changes when syncing in the future
- added col.(get|set|remove)_config()
- in order to support existing code that was mutating returned
values (eg col.conf["something"]["another"] = 5), the returned list/dict
will be automatically wrapped so that when the value is dropped, it
will save the mutated item back to the DB if it's changed. Code that
is fetching lists/dicts from the config like so:
col.conf["foo"]["bar"] = baz
col.setMod()
will continue to work in most case, but should be gradually updated to:
conf = col.get_config("foo")
conf["bar"] = baz
col.set_config("foo", conf)
4 lines
No EOL
81 B
SQL
4 lines
No EOL
81 B
SQL
insert
|
|
or replace into config (key, usn, mtime_secs, val)
|
|
values
|
|
(?, ?, ?, ?) |