Closed Bug 408646 Opened 17 years ago Closed 16 years ago

Allow specification of an alternate database for the storage provider

Categories

(Calendar :: Provider: Local Storage, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: Fallen, Unassigned)

References

Details

Attachments

(1 file)

As a first step towards offline support, we want to allow specification of an alternate filename for the sqlite file, to later allow using an "offline.sdb" to store offline data.

This is also a first step for bug 328603 and its dependancies. Further steps in that direction would include changing the extension and writing migration code to move the storage.sdb file to the new extension.

A small fix to the properties system is also contained. Currently, if you used setProperty() on an item and assign something other than a string or number (possibly other values?), the storage service will throw an error while writing the Properties. The last hunk of this patch silently ignores that error so that non-serializable data will remain empty.

I also took the liberty to un-anonymize the function names in the storage provider.
Attachment #293488 - Flags: review?(daniel.boelzle)
You can already use a file:// uri. Is that not enough? If not, why not make the moz-storage:// uri that's currently used a bit smarter, instead of adding a property?
Comment on attachment 293488 [details] [diff] [review]
Allow different databases for storage calendar

As discussed, IMO it's sufficient and more flexible to use the uri setter for this purpose. Besides that, I like that the patch you postpones database creation (ensureDatabaseConnection).
Attachment #293488 - Flags: review?(daniel.boelzle) → review-
I suggest to follow the Toolkit/Firefox procedure and name new database files with the suffix .sqlite instead of .sdb.
Assignee: philipp → nobody
Status: ASSIGNED → NEW
Not needed anymore, closing.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
No longer blocks: 380060
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: