| @@ 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 |
|
| @@ 575-583 (lines=9) @@ | ||
| 572 | * |
|
| 573 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 574 | */ |
|
| 575 | protected function getBaseDeleteSql() { |
|
| 576 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 577 | $expr = $qb->expr(); |
|
| 578 | ||
| 579 | $qb->delete('share') |
|
| 580 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 581 | ||
| 582 | return $qb; |
|
| 583 | } |
|
| 584 | ||
| 585 | ||
| 586 | /** |
|
| @@ 591-599 (lines=9) @@ | ||
| 588 | * |
|
| 589 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 590 | */ |
|
| 591 | protected function getBaseUpdateSql() { |
|
| 592 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 593 | $expr = $qb->expr(); |
|
| 594 | ||
| 595 | $qb->update('share') |
|
| 596 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 597 | ||
| 598 | return $qb; |
|
| 599 | } |
|
| 600 | } |
|
| 601 | ||
| @@ 360-369 (lines=10) @@ | ||
| 357 | * |
|
| 358 | * @return IQueryBuilder |
|
| 359 | */ |
|
| 360 | protected function getSharesUpdateSql($uniqueId) { |
|
| 361 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 362 | $qb->update(self::TABLE_SHARES) |
|
| 363 | ->where( |
|
| 364 | $qb->expr() |
|
| 365 | ->eq('unique_id', $qb->createNamedParameter((string)$uniqueId)) |
|
| 366 | ); |
|
| 367 | ||
| 368 | return $qb; |
|
| 369 | } |
|
| 370 | ||
| 371 | ||
| 372 | /** |
|
| @@ 394-403 (lines=10) @@ | ||
| 391 | * |
|
| 392 | * @return IQueryBuilder |
|
| 393 | */ |
|
| 394 | protected function getCirclesUpdateSql($uniqueId) { |
|
| 395 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 396 | $qb->update(self::TABLE_CIRCLES) |
|
| 397 | ->where( |
|
| 398 | $qb->expr() |
|
| 399 | ->eq('unique_id', $qb->createNamedParameter($uniqueId)) |
|
| 400 | ); |
|
| 401 | ||
| 402 | return $qb; |
|
| 403 | } |
|
| 404 | ||
| 405 | ||
| 406 | /** |
|
| @@ 413-425 (lines=13) @@ | ||
| 410 | * |
|
| 411 | * @return IQueryBuilder |
|
| 412 | */ |
|
| 413 | protected function getCirclesDeleteSql($circleUniqueId) { |
|
| 414 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 415 | $qb->delete(self::TABLE_CIRCLES) |
|
| 416 | ->where( |
|
| 417 | $qb->expr() |
|
| 418 | ->eq( |
|
| 419 | $qb->createFunction('LEFT(unique_id, ' . Circle::UNIQUEID_SHORT_LENGTH), |
|
| 420 | $qb->createNamedParameter($circleUniqueId) |
|
| 421 | ) |
|
| 422 | ); |
|
| 423 | ||
| 424 | return $qb; |
|
| 425 | } |
|
| 426 | ||
| 427 | ||
| 428 | /** |
|