| @@ 104-118 (lines=15) @@ | ||
| 101 | * |
|
| 102 | * @return IQueryBuilder |
|
| 103 | */ |
|
| 104 | protected function getGroupsUpdateSql($circleId, $groupId) { |
|
| 105 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 106 | $expr = $qb->expr(); |
|
| 107 | ||
| 108 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
|
| 109 | $qb->update(self::TABLE_GROUPS) |
|
| 110 | ->where( |
|
| 111 | $expr->andX( |
|
| 112 | $expr->eq('circle_id', $qb->createNamedParameter($circleId)), |
|
| 113 | $expr->eq('group_id', $qb->createNamedParameter($groupId)) |
|
| 114 | ) |
|
| 115 | ); |
|
| 116 | ||
| 117 | return $qb; |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * Base of the Sql Updte request for Members |
|
| @@ 128-142 (lines=15) @@ | ||
| 125 | * |
|
| 126 | * @return IQueryBuilder |
|
| 127 | */ |
|
| 128 | protected function getMembersUpdateSql($circleId, $userId) { |
|
| 129 | $qb = $this->dbConnection->getQueryBuilder(); |
|
| 130 | $expr = $qb->expr(); |
|
| 131 | ||
| 132 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
|
| 133 | $qb->update(self::TABLE_MEMBERS) |
|
| 134 | ->where( |
|
| 135 | $expr->andX( |
|
| 136 | $expr->eq('circle_id', $qb->createNamedParameter($circleId)), |
|
| 137 | $expr->eq('user_id', $qb->createNamedParameter($userId)) |
|
| 138 | ) |
|
| 139 | ); |
|
| 140 | ||
| 141 | return $qb; |
|
| 142 | } |
|
| 143 | ||
| 144 | ||
| 145 | /** |
|