|
@@ 154-166 (lines=13) @@
|
| 151 |
|
return $this->findEntities($qb); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
public function findDeleted($boardId, $limit = null, $offset = null) { |
| 155 |
|
$qb = $this->db->getQueryBuilder(); |
| 156 |
|
$qb->select('*') |
| 157 |
|
->from('deck_cards', 'c') |
| 158 |
|
->join('c', 'deck_stacks', 's', $qb->expr()->eq('s.id', 'c.stack_id')) |
| 159 |
|
->where($qb->expr()->eq('s.board_id', $qb->createNamedParameter($boardId))) |
| 160 |
|
->andWhere($qb->expr()->neq('c.archived', $qb->createNamedParameter(true))) |
| 161 |
|
->andWhere($qb->expr()->neq('c.deleted_at', $qb->createNamedParameter(0))) |
| 162 |
|
->orderBy('c.order') |
| 163 |
|
->setMaxResults($limit) |
| 164 |
|
->setFirstResult($offset); |
| 165 |
|
return $this->findEntities($qb); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function findCalendarEntries($boardId, $limit = null, $offset = null) { |
| 169 |
|
$qb = $this->db->getQueryBuilder(); |
|
@@ 168-181 (lines=14) @@
|
| 165 |
|
return $this->findEntities($qb); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function findCalendarEntries($boardId, $limit = null, $offset = null) { |
| 169 |
|
$qb = $this->db->getQueryBuilder(); |
| 170 |
|
$qb->select('c.*') |
| 171 |
|
->from('deck_cards', 'c') |
| 172 |
|
->join('c', 'deck_stacks', 's', 's.id = c.stack_id') |
| 173 |
|
->where($qb->expr()->eq('s.board_id', $qb->createNamedParameter($boardId))) |
| 174 |
|
->andWhere($qb->expr()->neq('c.archived', $qb->createNamedParameter(true))) |
| 175 |
|
->andWhere($qb->expr()->eq('c.deleted_at', $qb->createNamedParameter('0'))) |
| 176 |
|
->andWhere($qb->expr()->isNotNull('c.duedate')) |
| 177 |
|
->orderBy('c.duedate') |
| 178 |
|
->setMaxResults($limit) |
| 179 |
|
->setFirstResult($offset); |
| 180 |
|
return $this->findEntities($qb); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
|
| 184 |
|
public function findAllArchived($stackId, $limit = null, $offset = null) { |