| @@ 41-50 (lines=10) @@ | ||
| 38 | * |
|
| 39 | * @return IQueryBuilder |
|
| 40 | */ |
|
| 41 | protected function getSharesDeleteSql() { |
|
| 42 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 43 | $qb->delete(self::TABLE_FILE_SHARES); |
|
| 44 | $qb->where( |
|
| 45 | $qb->expr() |
|
| 46 | ->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE)) |
|
| 47 | ); |
|
| 48 | ||
| 49 | return $qb; |
|
| 50 | } |
|
| 51 | ||
| 52 | ||
| 53 | /** |
|
| @@ 107-116 (lines=10) @@ | ||
| 104 | * |
|
| 105 | * @return IQueryBuilder |
|
| 106 | */ |
|
| 107 | protected function getSharesUpdateSql($uniqueId) { |
|
| 108 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 109 | $qb->update(self::TABLE_SHARES) |
|
| 110 | ->where( |
|
| 111 | $qb->expr() |
|
| 112 | ->eq('unique_id', $qb->createNamedParameter((string)$uniqueId)) |
|
| 113 | ); |
|
| 114 | ||
| 115 | return $qb; |
|
| 116 | } |
|
| 117 | ||
| 118 | ||
| 119 | /** |
|
| @@ 325-334 (lines=10) @@ | ||
| 322 | * |
|
| 323 | * @return IQueryBuilder |
|
| 324 | */ |
|
| 325 | protected function getCirclesUpdateSql($uniqueId) { |
|
| 326 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 327 | $qb->update(self::TABLE_CIRCLES) |
|
| 328 | ->where( |
|
| 329 | $qb->expr() |
|
| 330 | ->eq('unique_id', $qb->createNamedParameter($uniqueId)) |
|
| 331 | ); |
|
| 332 | ||
| 333 | return $qb; |
|
| 334 | } |
|
| 335 | ||
| 336 | ||
| 337 | /** |
|
| @@ 344-353 (lines=10) @@ | ||
| 341 | * |
|
| 342 | * @return IQueryBuilder |
|
| 343 | */ |
|
| 344 | protected function getCirclesDeleteSql($circleUniqueId) { |
|
| 345 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 346 | $qb->delete(self::TABLE_CIRCLES) |
|
| 347 | ->where( |
|
| 348 | $qb->expr() |
|
| 349 | ->eq('unique_id', $qb->createNamedParameter($circleUniqueId)) |
|
| 350 | ); |
|
| 351 | ||
| 352 | return $qb; |
|
| 353 | } |
|
| 354 | ||
| 355 | ||
| 356 | /** |
|
| @@ 508-516 (lines=9) @@ | ||
| 505 | * |
|
| 506 | * @return IQueryBuilder |
|
| 507 | */ |
|
| 508 | protected function getBaseDeleteSql() { |
|
| 509 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 510 | $expr = $qb->expr(); |
|
| 511 | ||
| 512 | $qb->delete('share') |
|
| 513 | ->where($expr->eq('share_type', $qb->createNamedParameter(IShare::TYPE_CIRCLE))); |
|
| 514 | ||
| 515 | return $qb; |
|
| 516 | } |
|
| 517 | ||
| 518 | ||
| 519 | /** |
|
| @@ 524-532 (lines=9) @@ | ||
| 521 | * |
|
| 522 | * @return IQueryBuilder |
|
| 523 | */ |
|
| 524 | protected function getBaseUpdateSql() { |
|
| 525 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 526 | $expr = $qb->expr(); |
|
| 527 | ||
| 528 | $qb->update('share') |
|
| 529 | ->where($expr->eq('share_type', $qb->createNamedParameter(IShare::TYPE_CIRCLE))); |
|
| 530 | ||
| 531 | return $qb; |
|
| 532 | } |
|
| 533 | } |
|
| 534 | ||