Skip to content

Commit

Permalink
Lots of database refactoring
Browse files Browse the repository at this point in the history
- removed instance variable for `databaseVersion`
- refactored databaseVersion to use SQLite `PRAGMA user_version` via FMDB
- split apart the monolithic `-(BOOL)initDatabase` method
- removed `prepareStringForQuery` as this is best handled by FMDB (which it does by default in `executeUpdate`)
  • Loading branch information
josh64x2 committed Mar 8, 2015
1 parent 9ce6532 commit 7ae4849
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 326 deletions.
3 changes: 1 addition & 2 deletions src/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
BOOL initializedfoldersDict;
BOOL initializedSmartfoldersDict;
BOOL readOnly;
int databaseVersion;
int countOfUnread;
NSThread * mainThread;
BOOL inTransaction;
Expand All @@ -53,10 +52,10 @@
+(instancetype)sharedManager;
-(BOOL)initDatabase;
-(void)syncLastUpdate;
-(NSInteger)databaseVersion;
-(void)compactDatabase;
-(void)reindexDatabase;
-(NSInteger)countOfUnread;
-(NSInteger)databaseVersion;
-(BOOL)readOnly;
-(void)close;

Expand Down
Loading

0 comments on commit 7ae4849

Please sign in to comment.