Skip to content

Commit

Permalink
added the sqls for the projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Ulrich committed Jul 28, 2009
1 parent fe089e5 commit d27cf90
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ThingsPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,28 @@ - (id)init {

NSString *allSql = @"select title,dueDate from Task where status = 1";

NSString *todaySqlProjects = @"select t1.title,t1.dueDate,t2.title from Task as t1 left join Task as t2 on t2.uuid = t1.project where t1.status = 1 and t1.type = 2 and t1.flagged = 1";

NSString *nextSqlProjects = @"select t1.title,t1.dueDate,t2.title from Task as t1 left join Task as t2 on t2.uuid = t1.project where status = 1 and type = 2 and focus = 2";

NSString *somedaySqlProjects = @"select t1.title,t1.dueDate,t2.title from Task as t1 left join Task as t2 on t2.uuid = t1.project where status = 1 and type = 2 and focus = 16";

NSString *inboxSqlProjects = @"select t1.title,t1.dueDate,t2.title from Task as t1 left join Task as t2 on t2.uuid = t1.project where status = 1 and type = 2 and focus = 1";

NSString *allSqlProjects = @"select t1.title,t1.dueDate,t2.title from Task as t1 left join Task as t2 on t2.uuid = t1.project where status = 1";

//Add the to a dictionary to have access witht the settings-keys
sqlDict = [[NSDictionary alloc] initWithObjectsAndKeys:
todaySql, @"today",
nextSql, @"next",
somedaySql, @"someday",
inboxSql, @"inbox",
allSql, @"all",
todaySqlProjects, @"todayProjects",
nextSqlProjects, @"nextProjects",
somedaySqlProjects, @"somedayProjects",
inboxSqlProjects, @"inboxProjects",
allSqlProjects, @"allProjects",
nil];

preferences = [[NSMutableDictionary alloc] initWithContentsOfFile:preferencesPath];
Expand Down

0 comments on commit d27cf90

Please sign in to comment.