1 | <?php declare(strict_types=1); |
||
13 | class Query extends dbQuery implements QueryInterface |
||
|
|||
14 | { |
||
15 | /** @var TableMetadata */ |
||
16 | protected $metadata; |
||
17 | |||
18 | /** @var array Collection of parent table selected fields */ |
||
19 | protected $select = []; |
||
20 | |||
21 | /** @var array Collection of entity field names for sorting order */ |
||
22 | protected $sorting = []; |
||
23 | |||
24 | /** @var array Collection of entity field names for grouping query results */ |
||
25 | protected $grouping = []; |
||
26 | |||
27 | /** @var array Collection of query results limitations */ |
||
28 | protected $limitation = []; |
||
29 | |||
30 | /** @var TableMetadata[] Collection of joined entities */ |
||
31 | protected $joins = []; |
||
32 | |||
33 | /** @var Condition Query entity condition group */ |
||
34 | protected $condition; |
||
35 | |||
36 | /** @var DatabaseInterface Database instance */ |
||
37 | protected $database; |
||
38 | |||
39 | /** @var SQLBuilder SQL builder */ |
||
40 | protected $sqlBuilder; |
||
41 | |||
42 | /** |
||
43 | * Query constructor. |
||
44 | * |
||
45 | * @param Database Database instance |
||
46 | * @param SQLBuilder $sqlBuilder |
||
47 | */ |
||
48 | public function __construct(Database $database, SQLBuilder $sqlBuilder) |
||
49 | { |
||
50 | $this->database = $database; |
||
51 | $this->sqlBuilder = $sqlBuilder; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function find() : array |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function flush() : QueryInterface |
||
76 | |||
77 | /** |
||
78 | * Build SQL statement from this query. |
||
79 | * |
||
80 | * @return string SQL statement |
||
81 | * @throws \InvalidArgumentException |
||
82 | */ |
||
83 | protected function buildSQL() : string |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function count() : int |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | public function first() |
||
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | public function limit(int $quantity, int $offset = 0) : QueryInterface |
||
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | public function fields(string $fieldName) : array |
||
151 | |||
152 | /** |
||
153 | * {@inheritdoc} |
||
154 | */ |
||
155 | public function entity($metadata) : QueryInterface |
||
173 | |||
174 | /** |
||
175 | * {@inheritdoc} |
||
176 | */ |
||
177 | public function orderBy(string $fieldName, string $order = 'ASC', string $tableName = null) : QueryInterface |
||
185 | |||
186 | /** |
||
187 | * {@inheritdoc} |
||
188 | */ |
||
189 | public function whereCondition(ConditionInterface $condition) : QueryInterface |
||
195 | |||
196 | /** |
||
197 | * {@inheritdoc} |
||
198 | */ |
||
199 | public function select(string $tableName, string $fieldName) : QueryInterface |
||
205 | |||
206 | /** |
||
207 | * {@inheritdoc} |
||
208 | */ |
||
209 | public function join(string $entityName) : QueryInterface |
||
216 | |||
217 | /** |
||
218 | * {@inheritdoc} |
||
219 | */ |
||
220 | public function groupBy(string $tableName, string $fieldName) : QueryInterface |
||
227 | |||
228 | /** |
||
229 | * {@inheritdoc} |
||
230 | */ |
||
231 | public function isNull(string $fieldName) : QueryInterface |
||
235 | |||
236 | /** |
||
237 | * {@inheritdoc} |
||
238 | */ |
||
239 | public function where( |
||
250 | |||
251 | /** |
||
252 | * {@inheritdoc} |
||
253 | */ |
||
254 | public function notNull(string $fieldName) : QueryInterface |
||
258 | |||
259 | /** |
||
260 | * {@inheritdoc} |
||
261 | */ |
||
262 | public function notEmpty(string $fieldName) : QueryInterface |
||
266 | |||
267 | /** |
||
268 | * {@inheritdoc} |
||
269 | */ |
||
270 | public function like(string $fieldName, string $value = '') : QueryInterface |
||
274 | |||
275 | /** |
||
276 | * {@inheritdoc} |
||
277 | */ |
||
278 | public function primary($value) : QueryInterface |
||
282 | } |
||
283 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.