1 | <?php declare(strict_types=1); |
||
23 | class SQL extends AbstractSQL { |
||
24 | |||
25 | /** |
||
26 | * Get the query plan for the sql query |
||
27 | * |
||
28 | * @param string $sql |
||
29 | * @return string |
||
30 | */ |
||
31 | public function explain(string $sql): string |
||
35 | |||
36 | /** |
||
37 | * Random ordering keyword |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function random(): string |
||
45 | |||
46 | /** |
||
47 | * Returns sql to list other databases |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public function dbList(): string |
||
55 | |||
56 | /** |
||
57 | * Returns sql to list tables |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function tableList(): string |
||
73 | |||
74 | /** |
||
75 | * List the system tables |
||
76 | * |
||
77 | * @return string[] |
||
78 | */ |
||
79 | public function systemTableList(): array |
||
87 | |||
88 | /** |
||
89 | * Returns sql to list views |
||
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | public function viewList(): string |
||
99 | |||
100 | /** |
||
101 | * Returns sql to list triggers |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | public function triggerList(): string |
||
111 | |||
112 | /** |
||
113 | * Return sql to list functions |
||
114 | * |
||
115 | * @throws NotImplementedException |
||
116 | * @return string |
||
117 | */ |
||
118 | public function functionList(): string |
||
122 | |||
123 | /** |
||
124 | * Return sql to list stored procedures |
||
125 | * |
||
126 | * @throws NotImplementedException |
||
127 | * @return string |
||
128 | */ |
||
129 | public function procedureList(): string |
||
133 | |||
134 | /** |
||
135 | * Return sql to list sequences |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | public function sequenceList(): string |
||
143 | |||
144 | /** |
||
145 | * SQL to show list of field types |
||
146 | * |
||
147 | * @return string[] |
||
148 | */ |
||
149 | public function typeList(): array |
||
153 | |||
154 | /** |
||
155 | * SQL to show information about columns in a table |
||
156 | * |
||
157 | * @param string $table |
||
158 | * @return string |
||
159 | */ |
||
160 | public function columnList(string $table): string |
||
166 | |||
167 | /** |
||
168 | * Get the list of foreign keys for the current |
||
169 | * table |
||
170 | * |
||
171 | * @param string $table |
||
172 | * @return string |
||
173 | */ |
||
174 | public function fkList(string $table): string |
||
180 | |||
181 | |||
182 | /** |
||
183 | * Get the list of indexes for the current table |
||
184 | * |
||
185 | * @param string $table |
||
186 | * @return string |
||
187 | */ |
||
188 | public function indexList(string $table): string |
||
194 | } |