| @@ 152-160 (lines=9) @@ | ||
| 149 | * |
|
| 150 | * @return IQueryBuilder |
|
| 151 | */ |
|
| 152 | protected function getGroupsDeleteSql($groupId) { |
|
| 153 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 154 | $expr = $qb->expr(); |
|
| 155 | ||
| 156 | $qb->delete(CoreRequestBuilder::TABLE_GROUPS) |
|
| 157 | ->where($expr->eq('group_id', $qb->createNamedParameter($groupId))); |
|
| 158 | ||
| 159 | return $qb; |
|
| 160 | } |
|
| 161 | ||
| 162 | /** |
|
| 163 | * Base of the Sql Delete request for Members |
|
| @@ 577-585 (lines=9) @@ | ||
| 574 | * |
|
| 575 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 576 | */ |
|
| 577 | protected function getBaseDeleteSql() { |
|
| 578 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 579 | $expr = $qb->expr(); |
|
| 580 | ||
| 581 | $qb->delete('share') |
|
| 582 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 583 | ||
| 584 | return $qb; |
|
| 585 | } |
|
| 586 | ||
| 587 | ||
| 588 | /** |
|
| @@ 593-601 (lines=9) @@ | ||
| 590 | * |
|
| 591 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 592 | */ |
|
| 593 | protected function getBaseUpdateSql() { |
|
| 594 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 595 | $expr = $qb->expr(); |
|
| 596 | ||
| 597 | $qb->update('share') |
|
| 598 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 599 | ||
| 600 | return $qb; |
|
| 601 | } |
|
| 602 | } |
|
| 603 | ||
| @@ 366-375 (lines=10) @@ | ||
| 363 | * |
|
| 364 | * @return IQueryBuilder |
|
| 365 | */ |
|
| 366 | protected function getSharesUpdateSql($uniqueId) { |
|
| 367 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 368 | $qb->update(self::TABLE_SHARES) |
|
| 369 | ->where( |
|
| 370 | $qb->expr() |
|
| 371 | ->eq('unique_id', $qb->createNamedParameter((string)$uniqueId)) |
|
| 372 | ); |
|
| 373 | ||
| 374 | return $qb; |
|
| 375 | } |
|
| 376 | ||
| 377 | ||
| 378 | /** |
|
| @@ 400-409 (lines=10) @@ | ||
| 397 | * |
|
| 398 | * @return IQueryBuilder |
|
| 399 | */ |
|
| 400 | protected function getCirclesUpdateSql($uniqueId) { |
|
| 401 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 402 | $qb->update(self::TABLE_CIRCLES) |
|
| 403 | ->where( |
|
| 404 | $qb->expr() |
|
| 405 | ->eq('unique_id', $qb->createNamedParameter($uniqueId)) |
|
| 406 | ); |
|
| 407 | ||
| 408 | return $qb; |
|
| 409 | } |
|
| 410 | ||
| 411 | ||
| 412 | /** |
|
| @@ 419-431 (lines=13) @@ | ||
| 416 | * |
|
| 417 | * @return IQueryBuilder |
|
| 418 | */ |
|
| 419 | protected function getCirclesDeleteSql($circleUniqueId) { |
|
| 420 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 421 | $qb->delete(self::TABLE_CIRCLES) |
|
| 422 | ->where( |
|
| 423 | $qb->expr() |
|
| 424 | ->eq( |
|
| 425 | $qb->createFunction('LEFT(unique_id, ' . Circle::UNIQUEID_SHORT_LENGTH), |
|
| 426 | $qb->createNamedParameter($circleUniqueId) |
|
| 427 | ) |
|
| 428 | ); |
|
| 429 | ||
| 430 | return $qb; |
|
| 431 | } |
|
| 432 | ||
| 433 | ||
| 434 | /** |
|