Total Complexity | 0 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class DropStatement extends Statement |
||
14 | { |
||
15 | /** |
||
16 | * Options of this statement. |
||
17 | * |
||
18 | * @var array<string, int|array<int, int|string>> |
||
19 | * @psalm-var array<string, (positive-int|array{positive-int, ('var'|'var='|'expr'|'expr=')})> |
||
20 | */ |
||
21 | public static array $statementOptions = [ |
||
22 | 'DATABASE' => 1, |
||
23 | 'EVENT' => 1, |
||
24 | 'FUNCTION' => 1, |
||
25 | 'INDEX' => 1, |
||
26 | 'LOGFILE' => 1, |
||
27 | 'PROCEDURE' => 1, |
||
28 | 'SCHEMA' => 1, |
||
29 | 'SERVER' => 1, |
||
30 | 'TABLE' => 1, |
||
31 | 'VIEW' => 1, |
||
32 | 'TABLESPACE' => 1, |
||
33 | 'TRIGGER' => 1, |
||
34 | 'USER' => 1, |
||
35 | |||
36 | 'TEMPORARY' => 2, |
||
37 | 'IF EXISTS' => 3, |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * The clauses of this statement, in order. |
||
42 | * |
||
43 | * @see Statement::$clauses |
||
44 | * |
||
45 | * @var array<string, array{non-empty-string, int-mask-of<self::ADD_*>}> |
||
|
|||
46 | */ |
||
47 | public static array $clauses = [ |
||
48 | 'DROP' => [ |
||
49 | 'DROP', |
||
50 | Statement::ADD_KEYWORD, |
||
51 | ], |
||
52 | // Used for options. |
||
53 | '_OPTIONS' => [ |
||
54 | '_OPTIONS', |
||
55 | Statement::ADD_CLAUSE, |
||
56 | ], |
||
57 | // Used for select expressions. |
||
58 | 'DROP_' => [ |
||
59 | 'DROP', |
||
60 | Statement::ADD_CLAUSE, |
||
61 | ], |
||
62 | 'ON' => [ |
||
63 | 'ON', |
||
64 | Statement::ADD_CLAUSE | Statement::ADD_KEYWORD, |
||
65 | ], |
||
66 | ]; |
||
67 | |||
68 | /** |
||
69 | * Dropped elements. |
||
70 | * |
||
71 | * @var Expression[]|null |
||
72 | */ |
||
73 | public array|null $fields = null; |
||
74 | |||
75 | /** |
||
76 | * Table of the dropped index. |
||
77 | */ |
||
78 | public Expression|null $table = null; |
||
79 | } |
||
80 |