Debian Codegraph @

includes/libs/rdbms/querybuilder/JoinGroup.php

raw symbols SCIP
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 }