| Total Complexity | 5 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Query |
||
| 11 | { |
||
| 12 | /** @var Orm */ |
||
| 13 | protected $orm; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Responsável por gerar a Query completa |
||
| 17 | * @var Builder |
||
| 18 | */ |
||
| 19 | protected $builder; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | public $table; |
||
| 23 | |||
| 24 | /** @var string */ |
||
| 25 | public $raw = null; |
||
| 26 | |||
| 27 | /** @var array */ |
||
| 28 | public $values = []; |
||
| 29 | |||
| 30 | /** @var Where */ |
||
| 31 | public $where; |
||
| 32 | |||
| 33 | /** @var OrderBy */ |
||
| 34 | public $orderBy; |
||
| 35 | |||
| 36 | /** @var Limit */ |
||
| 37 | public $limit; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Prepara a query |
||
| 41 | * @param Orm $orm |
||
| 42 | */ |
||
| 43 | public function __construct(Orm $orm) |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Define o builder da Query |
||
| 55 | * @param string $statementType |
||
| 56 | * @return $this |
||
| 57 | * @example setStatement('SELECT'|'UPDATE'|'DELETE') |
||
| 58 | */ |
||
| 59 | public function build($statementType) |
||
| 60 | { |
||
| 61 | $this->builder = Builder::factory($statementType, $this); |
||
| 62 | |||
| 63 | return $this; |
||
| 64 | } |
||
| 65 | |||
| 66 | /** @return mixed[] */ |
||
| 67 | public function getValues() |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Retorna o comando SQL |
||
| 74 | * @return string |
||
| 75 | */ |
||
| 76 | public function __toString() |
||
| 87 |