| @@ 284-295 (lines=12) @@ | ||
| 281 | * |
|
| 282 | * @return bool |
|
| 283 | */ |
|
| 284 | public function removeAllFromCircle($circleId) { |
|
| 285 | $qb = $this->db->getQueryBuilder(); |
|
| 286 | $qb->delete(self::TABLENAME) |
|
| 287 | ->where( |
|
| 288 | $qb->expr() |
|
| 289 | ->eq('circle_id', $qb->createNamedParameter($circleId)) |
|
| 290 | ); |
|
| 291 | ||
| 292 | $qb->execute(); |
|
| 293 | ||
| 294 | return true; |
|
| 295 | } |
|
| 296 | ||
| 297 | ||
| 298 | /** |
|
| @@ 305-316 (lines=12) @@ | ||
| 302 | * |
|
| 303 | * @return bool |
|
| 304 | */ |
|
| 305 | public function removeAllFromUserId($userId) { |
|
| 306 | $qb = $this->db->getQueryBuilder(); |
|
| 307 | $qb->delete(self::TABLENAME) |
|
| 308 | ->where( |
|
| 309 | $qb->expr() |
|
| 310 | ->eq('user_id', $qb->createNamedParameter($userId)) |
|
| 311 | ); |
|
| 312 | ||
| 313 | $qb->execute(); |
|
| 314 | ||
| 315 | return true; |
|
| 316 | } |
|
| 317 | } |
|
| 318 | ||
| 319 | ||
| @@ 415-426 (lines=12) @@ | ||
| 412 | * |
|
| 413 | * @internal param Circle $circle |
|
| 414 | */ |
|
| 415 | public function destroy( |
|
| 416 | $circleId |
|
| 417 | ) { |
|
| 418 | $qb = $this->db->getQueryBuilder(); |
|
| 419 | $qb->delete(self::TABLENAME) |
|
| 420 | ->where( |
|
| 421 | $qb->expr() |
|
| 422 | ->eq( |
|
| 423 | 'id', $qb->createNamedParameter($circleId) |
|
| 424 | ) |
|
| 425 | ); |
|
| 426 | ||
| 427 | $qb->execute(); |
|
| 428 | } |
|
| 429 | ||