Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
JoinGroup | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAutoAlias | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getRawTables | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getRawJoinConds | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAlias | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace Wikimedia\Rdbms; |
4 | |
5 | /** |
6 | * Parenthesized group of table names and their join types and conditions. |
7 | * |
8 | * @internal |
9 | */ |
10 | class JoinGroup extends JoinGroupBase { |
11 | /** @var string */ |
12 | private $alias; |
13 | |
14 | /** @var int */ |
15 | private $nextAutoAlias = 0; |
16 | |
17 | /** |
18 | * Use SelectQueryBuilder::newJoinGroup() to create a join group |
19 | * |
20 | * @internal |
21 | * @param string $alias |
22 | */ |
23 | public function __construct( $alias ) { |
24 | $this->alias = $alias; |
25 | } |
26 | |
27 | /** |
28 | * Get a table alias which is unique to the parent SelectQueryBuilder |
29 | * |
30 | * @return string |
31 | */ |
32 | protected function getAutoAlias() { |
33 | return $this->alias . '_' . ( $this->nextAutoAlias++ ); |
34 | } |
35 | |
36 | /** |
37 | * @internal |
38 | * @return array |
39 | */ |
40 | public function getRawTables() { |
41 | return $this->tables; |
42 | } |
43 | |
44 | /** |
45 | * @internal |
46 | * @return array |
47 | */ |
48 | public function getRawJoinConds() { |
49 | return $this->joinConds; |
50 | } |
51 | |
52 | /** |
53 | * @internal |
54 | * @return string |
55 | */ |
56 | public function getAlias() { |
57 | return $this->alias; |
58 | } |
59 | } |