On 5/26/23 3:38 PM, Ryan W. West wrote:
> I'd also like to ask what the best way to read and write to the
> itemAnnotations table (insert, modify, and delete row) would be for
> Zotero 7 (Beta - hopefully it won't change a ton in this area). It
> looks like the Web API and Javascript API are possibly options
> (
https://www.zotero.org/support/dev/web_api/v3/write_requests) and
> read somewhere that directly modifying the sqlite database could cause
> corruption and is discouraged. If the above options don't work then
> maybe I'd need to write a plugin. Was wondering if any option would be
> preferable or easiest, and if there is any documentation or command to
> specifically use one to read/write this table.
Yes, you definitely wouldn't use SQL — all updates need to go through
either Zotero application code or the web API.
Whether you use the web API or the JS API really depends on your
implementation. We'll also soon be introducing a local HTTP API in the
desktop app that mirrors the web API, so if you're using an external
local process, you could write code now that uses the web API and switch
that to the local API later if you wanted offline functionality.