| @@ 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 | /** |
|
| @@ 507-515 (lines=9) @@ | ||
| 504 | * |
|
| 505 | * @return IQueryBuilder |
|
| 506 | */ |
|
| 507 | protected function getBaseDeleteSql() { |
|
| 508 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 509 | $expr = $qb->expr(); |
|
| 510 | ||
| 511 | $qb->delete('share') |
|
| 512 | ->where($expr->eq('share_type', $qb->createNamedParameter(IShare::TYPE_CIRCLE))); |
|
| 513 | ||
| 514 | return $qb; |
|
| 515 | } |
|
| 516 | ||
| 517 | ||
| 518 | /** |
|
| @@ 523-531 (lines=9) @@ | ||
| 520 | * |
|
| 521 | * @return IQueryBuilder |
|
| 522 | */ |
|
| 523 | protected function getBaseUpdateSql() { |
|
| 524 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 525 | $expr = $qb->expr(); |
|
| 526 | ||
| 527 | $qb->update('share') |
|
| 528 | ->where($expr->eq('share_type', $qb->createNamedParameter(IShare::TYPE_CIRCLE))); |
|
| 529 | ||
| 530 | return $qb; |
|
| 531 | } |
|
| 532 | } |
|
| 533 | ||
| @@ 324-333 (lines=10) @@ | ||
| 321 | * |
|
| 322 | * @return IQueryBuilder |
|
| 323 | */ |
|
| 324 | protected function getCirclesUpdateSql($uniqueId) { |
|
| 325 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 326 | $qb->update(self::TABLE_CIRCLES) |
|
| 327 | ->where( |
|
| 328 | $qb->expr() |
|
| 329 | ->eq('unique_id', $qb->createNamedParameter($uniqueId)) |
|
| 330 | ); |
|
| 331 | ||
| 332 | return $qb; |
|
| 333 | } |
|
| 334 | ||
| 335 | ||
| 336 | /** |
|
| @@ 343-352 (lines=10) @@ | ||
| 340 | * |
|
| 341 | * @return IQueryBuilder |
|
| 342 | */ |
|
| 343 | protected function getCirclesDeleteSql($circleUniqueId) { |
|
| 344 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 345 | $qb->delete(self::TABLE_CIRCLES) |
|
| 346 | ->where( |
|
| 347 | $qb->expr() |
|
| 348 | ->eq('unique_id', $qb->createNamedParameter($circleUniqueId)) |
|
| 349 | ); |
|
| 350 | ||
| 351 | return $qb; |
|
| 352 | } |
|
| 353 | ||
| 354 | ||
| 355 | /** |
|