Closed Bug 1118532 Opened 5 years ago Closed 5 years ago
Write a history sqlite provider
The purpose of this bug is to write a history sqlite backend. There's a couple steps here: 1.) Abstract our sqlite database a bit. FMDB provides nice access methods for us, but doesn't provide things like create/upgrade paths. I'm following Android's lead a lot here. 2.) Provide some file access through our "profile". For now I'm going to make this a profile folder with data in it. 3.) Write a history implementation. Simple and stupid for now. url+title. The visits table will be a separate bit of work.
This is a set of commits to basically give us what I described. Its got a lot of room to grow :) but I didn't want to try and tackle everything here. Thoughts? (Now I can get back to reviewing your stuff)
Status: NEW → ASSIGNED
Component: General → Data Storage
OS: Mac OS X → iOS 8
Hardware: x86 → All
Comment on attachment 8544888 [details] [review] Pull request Reviewed on GitHub. A few nits and OO questions, but otherwise rock on!
Attachment #8544888 - Flags: review?(rnewman) → review+
> 1.) Abstract our sqlite database a bit. FMDB provides nice access methods > for us, but doesn't provide things like create/upgrade paths. I'm following > Android's lead a lot here. IMO it's OK to delay upgrade handling to the point that we're unwilling to blow away users' data, if that makes for some flexibility for you.
Comment on attachment 8544888 [details] [review] Pull request Yep. I updated the pull request with some things we talked about. I also changed create/upgrade handling a bit. Before it was something like: // Create everything // Upgrade everything if we need to Now its // If we need to... // Create anything that doesn't already exist // Otherwise update it // If anything fails // If there's a backup file that's less than an hour old do nothing // Otherwise, backup the database and try to recreate it again from scratch
Attachment #8544888 - Flags: review+ → review?
Attachment #8544888 - Flags: review? → review?(rnewman)
Landed in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1122224
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.