29 lines
556 B
PHP
29 lines
556 B
PHP
|
<?php
|
||
|
|
||
|
namespace Ulmus\Query;
|
||
|
|
||
|
class Join extends Fragment {
|
||
|
|
||
|
const TYPE_LEFT = "LEFT";
|
||
|
const TYPE_RIGHT = "RIGHT";
|
||
|
const TYPE_INNER = "INNER";
|
||
|
const TYPE_FULL = "FULL";
|
||
|
const TYPE_CROSS = "CROSS";
|
||
|
const TYPE_NATURAL = "NATURAL";
|
||
|
|
||
|
public string $type = self::TYPE_INNER;
|
||
|
|
||
|
public bool $outer = false;
|
||
|
|
||
|
public function render() : string
|
||
|
{
|
||
|
return $this->renderSegments([
|
||
|
$this->side,
|
||
|
'JOIN',
|
||
|
/* table here! */,
|
||
|
'ON',
|
||
|
/* WHERE ! */
|
||
|
]);
|
||
|
}
|
||
|
}
|