add more query builder features
This commit is contained in:
@@ -63,6 +63,30 @@ class QueryBuilder
|
||||
return $this->where('priority:' . $priority);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function wherePriorityL()
|
||||
{
|
||||
return $this->wherePriority(Task::PRIORITY_LOW);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function wherePriorityM()
|
||||
{
|
||||
return $this->wherePriority(Task::PRIORITY_MEDIUM);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function wherePriorityH()
|
||||
{
|
||||
return $this->wherePriority(Task::PRIORITY_HIGH);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $status
|
||||
* @return $this
|
||||
@@ -72,6 +96,46 @@ class QueryBuilder
|
||||
return $this->where('status:' . $status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function wherePending()
|
||||
{
|
||||
return $this->whereStatus(Task::STATUS_PENDING);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function whereWaiting()
|
||||
{
|
||||
return $this->whereStatus(Task::STATUS_WAITING);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function whereCompleted()
|
||||
{
|
||||
return $this->whereStatus(Task::STATUS_COMPLETED);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function whereRecurring()
|
||||
{
|
||||
return $this->whereStatus(Task::STATUS_RECURRING);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function whereDeleted()
|
||||
{
|
||||
return $this->whereStatus(Task::STATUS_DELETED);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $where
|
||||
* @return $this
|
||||
|
Reference in New Issue
Block a user