-
Is it possible for an SQLite data file used by an add-on to be one of the files accessed with data.url()?
-
If so, how does one hand it off to Services.storage.openDatabase()
-
If not, is it possible for certain code (CREATE TABLE IF EXISTS…) to be executed only in a first-time run of an add-on?
Is it possible for an SQLite data file used by an add-on to be
Share
No. As of Add-on SDK 1.5, extensions are no longer uncompressed upon installation – they stay as packed XPI files on disk (which is good for performance). SQLite needs a physical file however, not something inside an archive.
Sure but you shouldn’t do it like this – what if your database file gets deleted for some reason? It is better to check whether the database already exists:
For reference: FileUtils.jsm