@@ -12,10 +12,10 @@ |
||
12 | 12 | namespace Phuria\SQLBuilder\TableFactory; |
13 | 13 | |
14 | 14 | use Phuria\SQLBuilder\QueryBuilder\AbstractBuilder; |
15 | -use Phuria\SQLBuilder\Table\SubQueryTable; |
|
16 | -use Phuria\SQLBuilder\Table\UnknownTable; |
|
17 | 15 | use Phuria\SQLBuilder\TableRecognizer; |
18 | 16 | use Phuria\SQLBuilder\TableRegistry; |
17 | +use Phuria\SQLBuilder\Table\SubQueryTable; |
|
18 | +use Phuria\SQLBuilder\Table\UnknownTable; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @author Beniamin Jonatan Šimko <[email protected]> |
@@ -12,8 +12,8 @@ |
||
12 | 12 | namespace Phuria\SQLBuilder\QueryBuilder\Component; |
13 | 13 | |
14 | 14 | use Phuria\SQLBuilder\QueryBuilder\AbstractBuilder; |
15 | -use Phuria\SQLBuilder\Table\AbstractTable; |
|
16 | 15 | use Phuria\SQLBuilder\TableFactory\TableFactoryInterface; |
16 | +use Phuria\SQLBuilder\Table\AbstractTable; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @author Beniamin Jonatan Šimko <[email protected]> |
@@ -12,8 +12,8 @@ |
||
12 | 12 | namespace Phuria\SQLBuilder\QueryBuilder\Component; |
13 | 13 | |
14 | 14 | use Phuria\SQLBuilder\QueryBuilder\AbstractBuilder; |
15 | -use Phuria\SQLBuilder\Table\AbstractTable; |
|
16 | 15 | use Phuria\SQLBuilder\TableFactory\TableFactoryInterface; |
16 | +use Phuria\SQLBuilder\Table\AbstractTable; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @author Beniamin Jonatan Šimko <[email protected]> |
@@ -62,7 +62,7 @@ |
||
62 | 62 | private function convertReferenceToValue($reference) |
63 | 63 | { |
64 | 64 | if (is_string($reference)) { |
65 | - return "\"" . $reference ."\""; |
|
65 | + return "\"" . $reference . "\""; |
|
66 | 66 | } elseif ($reference instanceof AbstractTable) { |
67 | 67 | return $reference->getAliasOrName(); |
68 | 68 | } elseif ($reference instanceof QueryComponentInterface) { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | - * @return SelectBuilder |
|
66 | + * @return QueryCompilerInterface |
|
67 | 67 | */ |
68 | 68 | public function select() |
69 | 69 | { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
74 | - * @return UpdateBuilder |
|
74 | + * @return QueryCompilerInterface |
|
75 | 75 | */ |
76 | 76 | public function update() |
77 | 77 | { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
82 | - * @return DeleteBuilder |
|
82 | + * @return QueryCompilerInterface |
|
83 | 83 | */ |
84 | 84 | public function delete() |
85 | 85 | { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * @return InsertBuilder |
|
90 | + * @return QueryCompilerInterface |
|
91 | 91 | */ |
92 | 92 | public function insert() |
93 | 93 | { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | - * @return InsertSelectBuilder |
|
98 | + * @return QueryCompilerInterface |
|
99 | 99 | */ |
100 | 100 | public function insertSelect() |
101 | 101 | { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
68 | - * @param $newSQL |
|
68 | + * @param string $newSQL |
|
69 | 69 | * |
70 | 70 | * @return CompilerPayload |
71 | 71 | */ |
@@ -33,12 +33,12 @@ |
||
33 | 33 | $clauseCompiler = new ClausesCompiler(); |
34 | 34 | |
35 | 35 | parent::__construct([ |
36 | - [$this, 'compileDelete'], |
|
37 | - [$tableCompiler, 'compileRootTables'], |
|
38 | - [$tableCompiler, 'compileJoinTables'], |
|
39 | - [$clauseCompiler, 'compileWhere'], |
|
40 | - [$clauseCompiler, 'compileOrderBy'], |
|
41 | - [$clauseCompiler, 'compileLimit'], |
|
36 | + [$this, 'compileDelete'], |
|
37 | + [$tableCompiler, 'compileRootTables'], |
|
38 | + [$tableCompiler, 'compileJoinTables'], |
|
39 | + [$clauseCompiler, 'compileWhere'], |
|
40 | + [$clauseCompiler, 'compileOrderBy'], |
|
41 | + [$clauseCompiler, 'compileLimit'], |
|
42 | 42 | [$referenceCompiler, 'compileReference'] |
43 | 43 | ]); |
44 | 44 | } |
@@ -33,14 +33,14 @@ |
||
33 | 33 | $clauseCompiler = new ClausesCompiler(); |
34 | 34 | |
35 | 35 | parent::__construct([ |
36 | - [$this, 'compileSelect'], |
|
37 | - [$tableCompiler, 'compileRootTables'], |
|
38 | - [$tableCompiler, 'compileJoinTables'], |
|
39 | - [$clauseCompiler, 'compileWhere'], |
|
40 | - [$clauseCompiler, 'compileGroupBy'], |
|
41 | - [$clauseCompiler, 'compileHaving'], |
|
42 | - [$clauseCompiler, 'compileOrderBy'], |
|
43 | - [$clauseCompiler, 'compileLimit'], |
|
36 | + [$this, 'compileSelect'], |
|
37 | + [$tableCompiler, 'compileRootTables'], |
|
38 | + [$tableCompiler, 'compileJoinTables'], |
|
39 | + [$clauseCompiler, 'compileWhere'], |
|
40 | + [$clauseCompiler, 'compileGroupBy'], |
|
41 | + [$clauseCompiler, 'compileHaving'], |
|
42 | + [$clauseCompiler, 'compileOrderBy'], |
|
43 | + [$clauseCompiler, 'compileLimit'], |
|
44 | 44 | [$referenceCompiler, 'compileReference'] |
45 | 45 | ]); |
46 | 46 | } |
@@ -33,13 +33,13 @@ |
||
33 | 33 | $clauseCompiler = new ClausesCompiler(); |
34 | 34 | |
35 | 35 | parent::__construct([ |
36 | - [$this, 'compileUpdate'], |
|
37 | - [$tableCompiler, 'compileRootTables'], |
|
38 | - [$tableCompiler, 'compileJoinTables'], |
|
39 | - [$clauseCompiler, 'compileSet'], |
|
40 | - [$clauseCompiler, 'compileWhere'], |
|
41 | - [$clauseCompiler, 'compileOrderBy'], |
|
42 | - [$clauseCompiler, 'compileLimit'], |
|
36 | + [$this, 'compileUpdate'], |
|
37 | + [$tableCompiler, 'compileRootTables'], |
|
38 | + [$tableCompiler, 'compileJoinTables'], |
|
39 | + [$clauseCompiler, 'compileSet'], |
|
40 | + [$clauseCompiler, 'compileWhere'], |
|
41 | + [$clauseCompiler, 'compileOrderBy'], |
|
42 | + [$clauseCompiler, 'compileLimit'], |
|
43 | 43 | [$referenceCompiler, 'compileReference'] |
44 | 44 | ]); |
45 | 45 | } |