-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDeleteQuery.php
45 lines (39 loc) · 1012 Bytes
/
DeleteQuery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace Aternos\Model\Query;
use BadMethodCallException;
/**
* Class DeleteQuery
*
* @package Aternos\Model\Query
*/
class DeleteQuery extends Query
{
/**
* DeleteQuery constructor.
*
* @param array|WhereCondition|WhereGroup|null $where
* @param array|null $order
* @param array|int|Limit|null $limit
*/
public function __construct(null|WhereCondition|array|WhereGroup $where = null,
null|array $order = null,
null|Limit|array|int $limit = null)
{
if ($where) {
$this->where($where);
}
if ($order) {
$this->orderBy($order);
}
if ($limit) {
$this->limit($limit);
}
}
/**
* @param array $fields
*/
public function fields(array $fields): static
{
throw new BadMethodCallException("You can't set fields on a delete query.");
}
}