| @@ 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 | ||
| @@ 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 | /** |
|
| @@ 331-340 (lines=10) @@ | ||
| 328 | * |
|
| 329 | * @return IQueryBuilder |
|
| 330 | */ |
|
| 331 | protected function getCirclesUpdateSql($uniqueId) { |
|
| 332 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 333 | $qb->update(self::TABLE_CIRCLES) |
|
| 334 | ->where( |
|
| 335 | $qb->expr() |
|
| 336 | ->eq('unique_id', $qb->createNamedParameter($uniqueId)) |
|
| 337 | ); |
|
| 338 | ||
| 339 | return $qb; |
|
| 340 | } |
|
| 341 | ||
| 342 | ||
| 343 | /** |
|
| @@ 350-359 (lines=10) @@ | ||
| 347 | * |
|
| 348 | * @return IQueryBuilder |
|
| 349 | */ |
|
| 350 | protected function getCirclesDeleteSql($circleUniqueId) { |
|
| 351 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 352 | $qb->delete(self::TABLE_CIRCLES) |
|
| 353 | ->where( |
|
| 354 | $qb->expr() |
|
| 355 | ->eq('unique_id', $qb->createNamedParameter($circleUniqueId)) |
|
| 356 | ); |
|
| 357 | ||
| 358 | return $qb; |
|
| 359 | } |
|
| 360 | ||
| 361 | ||
| 362 | /** |
|