| @@ 178-186 (lines=9) @@ | ||
| 175 | * |
|
| 176 | * @return IQueryBuilder |
|
| 177 | */ |
|
| 178 | protected function getGroupsDeleteSql($groupId) { |
|
| 179 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 180 | $expr = $qb->expr(); |
|
| 181 | ||
| 182 | $qb->delete(CoreRequestBuilder::TABLE_GROUPS) |
|
| 183 | ->where($expr->eq('group_id', $qb->createNamedParameter($groupId))); |
|
| 184 | ||
| 185 | return $qb; |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * Base of the Sql Delete request for Members |
|
| @@ 547-555 (lines=9) @@ | ||
| 544 | * |
|
| 545 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 546 | */ |
|
| 547 | protected function getBaseDeleteSql() { |
|
| 548 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 549 | $expr = $qb->expr(); |
|
| 550 | ||
| 551 | $qb->delete('share') |
|
| 552 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 553 | ||
| 554 | return $qb; |
|
| 555 | } |
|
| 556 | ||
| 557 | ||
| 558 | /** |
|
| @@ 563-571 (lines=9) @@ | ||
| 560 | * |
|
| 561 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 562 | */ |
|
| 563 | protected function getBaseUpdateSql() { |
|
| 564 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 565 | $expr = $qb->expr(); |
|
| 566 | ||
| 567 | $qb->update('share') |
|
| 568 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 569 | ||
| 570 | return $qb; |
|
| 571 | } |
|
| 572 | } |
|
| 573 | ||
| @@ 397-406 (lines=10) @@ | ||
| 394 | * |
|
| 395 | * @return IQueryBuilder |
|
| 396 | */ |
|
| 397 | protected function getSharesUpdateSql($uniqueId) { |
|
| 398 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 399 | $qb->update(self::TABLE_SHARES) |
|
| 400 | ->where( |
|
| 401 | $qb->expr() |
|
| 402 | ->eq('unique_id', $qb->createNamedParameter((string)$uniqueId)) |
|
| 403 | ); |
|
| 404 | ||
| 405 | return $qb; |
|
| 406 | } |
|
| 407 | ||
| 408 | ||
| 409 | /** |
|
| @@ 431-440 (lines=10) @@ | ||
| 428 | * |
|
| 429 | * @return IQueryBuilder |
|
| 430 | */ |
|
| 431 | protected function getCirclesUpdateSql($uniqueId) { |
|
| 432 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 433 | $qb->update(self::TABLE_CIRCLES) |
|
| 434 | ->where( |
|
| 435 | $qb->expr() |
|
| 436 | ->eq('unique_id', $qb->createNamedParameter($uniqueId)) |
|
| 437 | ); |
|
| 438 | ||
| 439 | return $qb; |
|
| 440 | } |
|
| 441 | ||
| 442 | ||
| 443 | /** |
|
| @@ 450-462 (lines=13) @@ | ||
| 447 | * |
|
| 448 | * @return IQueryBuilder |
|
| 449 | */ |
|
| 450 | protected function getCirclesDeleteSql($circleUniqueId) { |
|
| 451 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 452 | $qb->delete(self::TABLE_CIRCLES) |
|
| 453 | ->where( |
|
| 454 | $qb->expr() |
|
| 455 | ->eq( |
|
| 456 | $qb->createFunction( |
|
| 457 | 'SUBSTR(`unique_id`, 1, ' . Circle::UNIQUEID_SHORT_LENGTH . ')' |
|
| 458 | ), |
|
| 459 | $qb->createNamedParameter($circleUniqueId) |
|
| 460 | ) |
|
| 461 | ); |
|
| 462 | ||
| 463 | return $qb; |
|
| 464 | } |
|
| 465 | ||