split recur list
This commit is contained in:
parent
bcce505934
commit
bf8c2b1f5d
|
@ -67,10 +67,10 @@ WHERE id = ?`, id).Scan(&tsk.ID, &tsk.Title, &tsk.Project, &dateStr, &timeStr, &
|
||||||
func (t *SqliteTask) FindMany(params storage.TaskListParams) ([]item.Task, error) {
|
func (t *SqliteTask) FindMany(params storage.TaskListParams) ([]item.Task, error) {
|
||||||
query := `SELECT id, title, project, date, time, duration, recurrer FROM tasks`
|
query := `SELECT id, title, project, date, time, duration, recurrer FROM tasks`
|
||||||
args := []interface{}{}
|
args := []interface{}{}
|
||||||
where := []string{}
|
|
||||||
|
|
||||||
|
where := []string{`recurrer = ''`}
|
||||||
if params.Recurrer {
|
if params.Recurrer {
|
||||||
where = append(where, `recurrer IS NOT NULL AND recurrer != ''`)
|
where[0] = `recurrer != ''`
|
||||||
}
|
}
|
||||||
if !params.Date.IsZero() && !params.IncludeBefore {
|
if !params.Date.IsZero() && !params.IncludeBefore {
|
||||||
where = append(where, `date = ?`)
|
where = append(where, `date = ?`)
|
||||||
|
|
Loading…
Reference in New Issue