1 | <?php declare(strict_types=1); |
||
22 | class SQL extends AbstractSQL { |
||
23 | |||
24 | /** |
||
25 | * Limit clause |
||
26 | * |
||
27 | * @param string $sql |
||
28 | * @param int $limit |
||
29 | * @param int|boolean $offset |
||
30 | * @return string |
||
31 | */ |
||
32 | public function limit(string $sql, int $limit, $offset=FALSE): string |
||
41 | |||
42 | /** |
||
43 | * Get the query plan for the sql query |
||
44 | * |
||
45 | * @param string $sql |
||
46 | * @return string |
||
47 | */ |
||
48 | public function explain(string $sql): string |
||
52 | |||
53 | /** |
||
54 | * Random ordering keyword |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | public function random(): string |
||
62 | |||
63 | /** |
||
64 | * Returns sql to list other databases |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function dbList(): string |
||
75 | |||
76 | /** |
||
77 | * Returns sql to list tables |
||
78 | * |
||
79 | * @param string $database |
||
80 | * @return string |
||
81 | */ |
||
82 | public function tableList($database=''): string |
||
93 | |||
94 | /** |
||
95 | * Overridden in MySQL class |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | public function systemTableList(): string |
||
106 | |||
107 | /** |
||
108 | * Returns sql to list views |
||
109 | * |
||
110 | * @return string |
||
111 | */ |
||
112 | public function viewList(): string |
||
116 | |||
117 | /** |
||
118 | * Returns sql to list triggers |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | public function triggerList(): string |
||
126 | |||
127 | /** |
||
128 | * Return sql to list functions |
||
129 | * |
||
130 | * @return string |
||
131 | */ |
||
132 | public function functionList(): string |
||
136 | |||
137 | /** |
||
138 | * Return sql to list stored procedures |
||
139 | * |
||
140 | * @return string |
||
141 | */ |
||
142 | public function procedureList(): string |
||
146 | |||
147 | /** |
||
148 | * Return sql to list sequences |
||
149 | * |
||
150 | * @return string |
||
151 | */ |
||
152 | public function sequenceList(): ?string |
||
156 | |||
157 | /** |
||
158 | * SQL to show list of field types |
||
159 | * |
||
160 | * @return string |
||
161 | */ |
||
162 | public function typeList(): string |
||
166 | |||
167 | /** |
||
168 | * SQL to show infromation about columns in a table |
||
169 | * |
||
170 | * @param string $table |
||
171 | * @return string |
||
172 | */ |
||
173 | public function columnList(string $table): string |
||
177 | |||
178 | /** |
||
179 | * Get the list of foreign keys for the current |
||
180 | * table |
||
181 | * |
||
182 | * @param string $table |
||
183 | * @return string |
||
184 | */ |
||
185 | public function fkList(string $table): string |
||
203 | |||
204 | /** |
||
205 | * Get the list of indexes for the current table |
||
206 | * |
||
207 | * @param string $table |
||
208 | * @return string |
||
209 | */ |
||
210 | public function indexList(string $table): string |
||
214 | } |