| @@ 221-228 (lines=8) @@ | ||
| 218 | $expr = $qb->expr(); |
|
| 219 | ||
| 220 | // TODO - Remove this in 12.0.1 |
|
| 221 | if ($qb->getConnection() |
|
| 222 | ->getDatabasePlatform() instanceof PostgreSqlPlatform |
|
| 223 | ) { |
|
| 224 | $tmpOrX = $expr->eq('s.share_with', $qb->createFunction('CAST(c.id AS TEXT)')); |
|
| 225 | } else { |
|
| 226 | $tmpOrX = |
|
| 227 | $expr->eq('s.share_with', $expr->castColumn('c.id', IQueryBuilder::PARAM_STR)); |
|
| 228 | } |
|
| 229 | ||
| 230 | $qb->from(CirclesMapper::TABLENAME, 'c'); |
|
| 231 | ||
| @@ 275-283 (lines=9) @@ | ||
| 272 | $expr = $qb->expr(); |
|
| 273 | ||
| 274 | // TODO - Remove this in 12.0.1 |
|
| 275 | if ($qb->getConnection() |
|
| 276 | ->getDatabasePlatform() instanceof PostgreSqlPlatform |
|
| 277 | ) { |
|
| 278 | $tmpAndX = $expr->eq('s.share_with', $qb->createFunction('CAST(m.circle_id AS TEXT)')); |
|
| 279 | } else { |
|
| 280 | $tmpAndX = $expr->eq( |
|
| 281 | 's.share_with', $expr->castColumn('m.circle_id', IQueryBuilder::PARAM_STR) |
|
| 282 | ); |
|
| 283 | } |
|
| 284 | ||
| 285 | $qb->from(MembersMapper::TABLENAME, 'm') |
|
| 286 | ->andWhere($tmpAndX) |
|
| @@ 304-317 (lines=14) @@ | ||
| 301 | $qb->from(MembersMapper::TABLENAME, 'm'); |
|
| 302 | ||
| 303 | // TODO - Remove this in 12.0.1 |
|
| 304 | if ($qb->getConnection() |
|
| 305 | ->getDatabasePlatform() instanceof PostgreSqlPlatform |
|
| 306 | ) { |
|
| 307 | $qb->andWhere( |
|
| 308 | $expr->eq('s.share_with', $qb->createFunction('CAST(m.circle_id AS TEXT)')) |
|
| 309 | ); |
|
| 310 | } else { |
|
| 311 | ||
| 312 | $qb->andWhere( |
|
| 313 | $expr->eq( |
|
| 314 | 's.share_with', $expr->castColumn('m.circle_id', IQueryBuilder::PARAM_STR) |
|
| 315 | ) |
|
| 316 | ); |
|
| 317 | } |
|
| 318 | } |
|
| 319 | ||
| 320 | ||