1 | <?php |
||||||||||
2 | |||||||||||
3 | namespace Lagdo\DbAdmin\Driver\Db; |
||||||||||
4 | |||||||||||
5 | use Lagdo\DbAdmin\Driver\Entity\TableFieldEntity; |
||||||||||
6 | |||||||||||
7 | use function substr; |
||||||||||
8 | use function str_replace; |
||||||||||
9 | |||||||||||
10 | trait GrammarTrait |
||||||||||
11 | { |
||||||||||
12 | /** |
||||||||||
13 | * @inheritDoc |
||||||||||
14 | */ |
||||||||||
15 | public function escapeId(string $idf) |
||||||||||
16 | { |
||||||||||
17 | return $idf; |
||||||||||
18 | } |
||||||||||
19 | |||||||||||
20 | /** |
||||||||||
21 | * @inheritDoc |
||||||||||
22 | */ |
||||||||||
23 | public function unescapeId(string $idf) |
||||||||||
24 | { |
||||||||||
25 | $last = substr($idf, -1); |
||||||||||
26 | return str_replace($last . $last, $last, substr($idf, 1, -1)); |
||||||||||
27 | } |
||||||||||
28 | |||||||||||
29 | /** |
||||||||||
30 | * @inheritDoc |
||||||||||
31 | */ |
||||||||||
32 | public function convertField(TableFieldEntity $field) |
||||||||||
0 ignored issues
–
show
|
|||||||||||
33 | { |
||||||||||
34 | return ''; |
||||||||||
35 | } |
||||||||||
36 | |||||||||||
37 | /** |
||||||||||
38 | * @inheritDoc |
||||||||||
39 | */ |
||||||||||
40 | public function unconvertField(TableFieldEntity $field, string $value) |
||||||||||
0 ignored issues
–
show
The parameter
$field is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||||||
41 | { |
||||||||||
42 | return $value; |
||||||||||
43 | } |
||||||||||
44 | |||||||||||
45 | /** |
||||||||||
46 | * @inheritDoc |
||||||||||
47 | */ |
||||||||||
48 | public function getCreateTableQuery(string $table, bool $autoIncrement, string $style) |
||||||||||
0 ignored issues
–
show
The parameter
$style is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$autoIncrement is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$table is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||||||
49 | { |
||||||||||
50 | return ''; |
||||||||||
51 | } |
||||||||||
52 | |||||||||||
53 | /** |
||||||||||
54 | * @inheritDoc |
||||||||||
55 | */ |
||||||||||
56 | public function getCreateIndexQuery(string $table, string $type, string $name, string $columns) |
||||||||||
0 ignored issues
–
show
The parameter
$columns is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$type is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$name is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() The parameter
$table is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||||||
57 | { |
||||||||||
58 | return ''; |
||||||||||
59 | } |
||||||||||
60 | |||||||||||
61 | /** |
||||||||||
62 | * @inheritDoc |
||||||||||
63 | */ |
||||||||||
64 | public function getUseDatabaseQuery(string $database) |
||||||||||
0 ignored issues
–
show
The parameter
$database is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||||||
65 | { |
||||||||||
66 | return ''; |
||||||||||
67 | } |
||||||||||
68 | |||||||||||
69 | /** |
||||||||||
70 | * @inheritDoc |
||||||||||
71 | */ |
||||||||||
72 | public function getForeignKeysQuery(string $table) |
||||||||||
0 ignored issues
–
show
The parameter
$table is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||||||
73 | { |
||||||||||
74 | return ''; |
||||||||||
75 | } |
||||||||||
76 | |||||||||||
77 | /** |
||||||||||
78 | * @inheritDoc |
||||||||||
79 | */ |
||||||||||
80 | public function getTruncateTableQuery(string $table) |
||||||||||
0 ignored issues
–
show
The parameter
$table is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||||||
81 | { |
||||||||||
82 | return ''; |
||||||||||
83 | } |
||||||||||
84 | |||||||||||
85 | /** |
||||||||||
86 | * @inheritDoc |
||||||||||
87 | */ |
||||||||||
88 | public function getCreateTriggerQuery(string $table) |
||||||||||
0 ignored issues
–
show
The parameter
$table is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||||||
89 | { |
||||||||||
90 | return ''; |
||||||||||
91 | } |
||||||||||
92 | |||||||||||
93 | /** |
||||||||||
94 | * @inheritDoc |
||||||||||
95 | */ |
||||||||||
96 | public function getAutoIncrementModifier() |
||||||||||
97 | { |
||||||||||
98 | return ''; |
||||||||||
99 | } |
||||||||||
100 | } |
||||||||||
101 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.