| @@ 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 | ||
| @@ 383-392 (lines=10) @@ | ||
| 380 | * |
|
| 381 | * @return IQueryBuilder |
|
| 382 | */ |
|
| 383 | protected function getSharesUpdateSql($uniqueId) { |
|
| 384 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 385 | $qb->update(self::TABLE_SHARES) |
|
| 386 | ->where( |
|
| 387 | $qb->expr() |
|
| 388 | ->eq('unique_id', $qb->createNamedParameter((string)$uniqueId)) |
|
| 389 | ); |
|
| 390 | ||
| 391 | return $qb; |
|
| 392 | } |
|
| 393 | ||
| 394 | ||
| 395 | /** |
|
| @@ 417-426 (lines=10) @@ | ||
| 414 | * |
|
| 415 | * @return IQueryBuilder |
|
| 416 | */ |
|
| 417 | protected function getCirclesUpdateSql($uniqueId) { |
|
| 418 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 419 | $qb->update(self::TABLE_CIRCLES) |
|
| 420 | ->where( |
|
| 421 | $qb->expr() |
|
| 422 | ->eq('unique_id', $qb->createNamedParameter($uniqueId)) |
|
| 423 | ); |
|
| 424 | ||
| 425 | return $qb; |
|
| 426 | } |
|
| 427 | ||
| 428 | ||
| 429 | /** |
|
| @@ 436-448 (lines=13) @@ | ||
| 433 | * |
|
| 434 | * @return IQueryBuilder |
|
| 435 | */ |
|
| 436 | protected function getCirclesDeleteSql($circleUniqueId) { |
|
| 437 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 438 | $qb->delete(self::TABLE_CIRCLES) |
|
| 439 | ->where( |
|
| 440 | $qb->expr() |
|
| 441 | ->eq( |
|
| 442 | $qb->createFunction( |
|
| 443 | 'SUBSTR(`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')' |
|
| 444 | ), |
|
| 445 | $qb->createNamedParameter($circleUniqueId) |
|
| 446 | ) |
|
| 447 | ); |
|
| 448 | ||
| 449 | return $qb; |
|
| 450 | } |
|
| 451 | ||