| @@ 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 | /** |
|
| @@ 175-183 (lines=9) @@ | ||
| 172 | * |
|
| 173 | * @return IQueryBuilder |
|
| 174 | */ |
|
| 175 | protected function getGroupsDeleteSql($groupId) { |
|
| 176 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 177 | $expr = $qb->expr(); |
|
| 178 | ||
| 179 | $qb->delete(CoreRequestBuilder::TABLE_GROUPS) |
|
| 180 | ->where($expr->eq('group_id', $qb->createNamedParameter($groupId))); |
|
| 181 | ||
| 182 | return $qb; |
|
| 183 | } |
|
| 184 | ||
| 185 | /** |
|
| 186 | * Base of the Sql Delete request for Members |
|
| @@ 542-550 (lines=9) @@ | ||
| 539 | * |
|
| 540 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 541 | */ |
|
| 542 | protected function getBaseDeleteSql() { |
|
| 543 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 544 | $expr = $qb->expr(); |
|
| 545 | ||
| 546 | $qb->delete('share') |
|
| 547 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 548 | ||
| 549 | return $qb; |
|
| 550 | } |
|
| 551 | ||
| 552 | ||
| 553 | /** |
|
| @@ 558-566 (lines=9) @@ | ||
| 555 | * |
|
| 556 | * @return \OCP\DB\QueryBuilder\IQueryBuilder |
|
| 557 | */ |
|
| 558 | protected function getBaseUpdateSql() { |
|
| 559 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 560 | $expr = $qb->expr(); |
|
| 561 | ||
| 562 | $qb->update('share') |
|
| 563 | ->where($expr->eq('share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE))); |
|
| 564 | ||
| 565 | return $qb; |
|
| 566 | } |
|
| 567 | } |
|
| 568 | ||