|
@@ 130-142 (lines=13) @@
|
| 127 |
|
* @param array $parameters Any additional parameters if the join is a parameterised subquery |
| 128 |
|
* @return self Self reference |
| 129 |
|
*/ |
| 130 |
|
public function addLeftJoin($table, $onPredicate, $tableAlias = '', $order = 20, $parameters = array()) { |
| 131 |
|
if(!$tableAlias) { |
| 132 |
|
$tableAlias = $table; |
| 133 |
|
} |
| 134 |
|
$this->from[$tableAlias] = array( |
| 135 |
|
'type' => 'LEFT', |
| 136 |
|
'table' => $table, |
| 137 |
|
'filter' => array($onPredicate), |
| 138 |
|
'order' => $order, |
| 139 |
|
'parameters' => $parameters |
| 140 |
|
); |
| 141 |
|
return $this; |
| 142 |
|
} |
| 143 |
|
|
| 144 |
|
/** |
| 145 |
|
* Add an INNER JOIN criteria |
|
@@ 157-167 (lines=11) @@
|
| 154 |
|
* @param array $parameters Any additional parameters if the join is a parameterised subquery |
| 155 |
|
* @return self Self reference |
| 156 |
|
*/ |
| 157 |
|
public function addInnerJoin($table, $onPredicate, $tableAlias = null, $order = 20, $parameters = array()) { |
| 158 |
|
if(!$tableAlias) $tableAlias = $table; |
| 159 |
|
$this->from[$tableAlias] = array( |
| 160 |
|
'type' => 'INNER', |
| 161 |
|
'table' => $table, |
| 162 |
|
'filter' => array($onPredicate), |
| 163 |
|
'order' => $order, |
| 164 |
|
'parameters' => $parameters |
| 165 |
|
); |
| 166 |
|
return $this; |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
/** |
| 170 |
|
* Add an additional filter (part of the ON clause) on a join. |