5
5
namespace Yiisoft \Db \Query ;
6
6
7
7
use Closure ;
8
+ use Yiisoft \Db \Connection \ConnectionInterface ;
8
9
use Yiisoft \Db \Exception \NotSupportedException ;
9
10
use Yiisoft \Db \Expression \ExpressionInterface ;
10
11
13
14
* query, such as the {@see addGroupBy()}, {@see addSelect()}, {@see addOrderBy()}, {@see andFilterCompare()}, etc.
14
15
*
15
16
* {@see Query} uses these methods to build and manipulate SQL statements.
17
+ *
18
+ * @psalm-import-type ParamsType from ConnectionInterface
16
19
*/
17
20
interface QueryPartsInterface
18
21
{
@@ -126,6 +129,8 @@ public function andFilterHaving(array $condition): static;
126
129
* Please refer to {@see where()} on how to specify this parameter.
127
130
* @param array $params The parameters (name => value) to be bound to the query.
128
131
*
132
+ * @psalm-param ParamsType $params
133
+ *
129
134
* @see having()
130
135
* @see orHaving()
131
136
*/
@@ -160,6 +165,8 @@ public function andFilterWhere(array $condition): static;
160
165
* Please refer to {@see where()} on how to specify this parameter.
161
166
* @param array $params The parameters (name => value) to be bound to the query.
162
167
*
168
+ * @psalm-param ParamsType $params
169
+ *
163
170
* @see where()
164
171
* @see orWhere()
165
172
*/
@@ -293,6 +300,8 @@ public function groupBy(array|string|ExpressionInterface $columns): static;
293
300
* Please refer to {@see where()} on how to specify this parameter.
294
301
* @param array $params The parameters (name => value) to bind to the query.
295
302
*
303
+ * @psalm-param ParamsType $params
304
+ *
296
305
* @see andHaving()
297
306
* @see orHaving()
298
307
*/
@@ -329,6 +338,8 @@ public function indexBy(string|Closure|null $column): static;
329
338
* @param array|string $on The join condition that should appear in the ON part. Please refer to {@see join()} on
330
339
* how to specify this parameter.
331
340
* @param array $params The parameters (name => value) to bind to the query.
341
+ *
342
+ * @psalm-param ParamsType $params
332
343
*/
333
344
public function innerJoin (array |string $ table , array |string $ on = '' , array $ params = []): static ;
334
345
@@ -357,6 +368,8 @@ public function innerJoin(array|string $table, array|string $on = '', array $par
357
368
* 'post.author_id = user.id'
358
369
* ```
359
370
* @param array $params The parameters (name => value) to bind to the query.
371
+ *
372
+ * @psalm-param ParamsType $params
360
373
*/
361
374
public function join (string $ type , array |string $ table , array |string $ on = '' , array $ params = []): static ;
362
375
@@ -374,6 +387,8 @@ public function join(string $type, array|string $table, array|string $on = '', a
374
387
* @param array|string $on The join condition that should appear in the ON part. Please refer to {@see join()} on
375
388
* how to specify this parameter.
376
389
* @param array $params The parameters (name => value) to bind to the query.
390
+ *
391
+ * @psalm-param ParamsType $params
377
392
*/
378
393
public function leftJoin (array |string $ table , array |string $ on = '' , array $ params = []): static ;
379
394
@@ -454,6 +469,8 @@ public function orFilterHaving(array $condition): static;
454
469
* Please refer to {@see where()} on how to specify this parameter.
455
470
* @param array $params The parameters (name => value) to bind to the query.
456
471
*
472
+ * @psalm-param ParamsType $params
473
+ *
457
474
* @see having()
458
475
* @see andHaving()
459
476
*/
@@ -468,6 +485,8 @@ public function orHaving(array|string|ExpressionInterface $condition, array $par
468
485
* Please refer to {@see where()} on how to specify this parameter.
469
486
* @param array $params The parameters (name => value) to bind to the query.
470
487
*
488
+ * @psalm-param ParamsType $params
489
+ *
471
490
* @see where()
472
491
* @see andWhere()
473
492
*/
@@ -487,6 +506,8 @@ public function orWhere(array|string|ExpressionInterface $condition, array $para
487
506
* @param array|string $on The join condition that should appear in the ON part.
488
507
* Please refer to {@see join()} on how to specify this parameter.
489
508
* @param array $params The parameters (name => value) to be bound to the query.
509
+ *
510
+ * @psalm-param ParamsType $params
490
511
*/
491
512
public function rightJoin (array |string $ table , array |string $ on = '' , array $ params = []): static ;
492
513
@@ -636,6 +657,8 @@ public function union(QueryInterface|string $sql, bool $all = false): static;
636
657
* @param array|ExpressionInterface|string|null $condition The conditions to put in the `WHERE` part.
637
658
* @param array $params The parameters (name => value) to bind to the query.
638
659
*
660
+ * @psalm-param ParamsType $params
661
+ *
639
662
* @see andWhere()
640
663
* @see orWhere()
641
664
*/
0 commit comments