1 | <?php |
||
24 | class SQL extends \Query\AbstractSQL { |
||
25 | |||
26 | /** |
||
27 | * Limit clause |
||
28 | * |
||
29 | * @param string $sql |
||
30 | * @param int $limit |
||
31 | * @param int $offset |
||
32 | * @return string |
||
33 | */ |
||
34 | public function limit($sql, $limit, $offset=FALSE) |
||
43 | |||
44 | // -------------------------------------------------------------------------- |
||
45 | |||
46 | /** |
||
47 | * Get the query plan for the sql query |
||
48 | * |
||
49 | * @param string $sql |
||
50 | * @return string |
||
51 | */ |
||
52 | public function explain($sql) |
||
56 | |||
57 | // -------------------------------------------------------------------------- |
||
58 | |||
59 | /** |
||
60 | * Random ordering keyword |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function random() |
||
68 | |||
69 | // -------------------------------------------------------------------------- |
||
70 | |||
71 | /** |
||
72 | * Returns sql to list other databases |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | public function db_list() |
||
80 | |||
81 | // -------------------------------------------------------------------------- |
||
82 | |||
83 | /** |
||
84 | * Returns sql to list tables |
||
85 | * |
||
86 | * @param string $database |
||
87 | * @return string |
||
88 | */ |
||
89 | public function table_list($database='') |
||
98 | |||
99 | // -------------------------------------------------------------------------- |
||
100 | |||
101 | /** |
||
102 | * Overridden in MySQL class |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | public function system_table_list() |
||
111 | |||
112 | // -------------------------------------------------------------------------- |
||
113 | |||
114 | /** |
||
115 | * Returns sql to list views |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | public function view_list() |
||
123 | |||
124 | // -------------------------------------------------------------------------- |
||
125 | |||
126 | /** |
||
127 | * Returns sql to list triggers |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | public function trigger_list() |
||
135 | |||
136 | // -------------------------------------------------------------------------- |
||
137 | |||
138 | /** |
||
139 | * Return sql to list functions |
||
140 | * |
||
141 | * @return string |
||
142 | */ |
||
143 | public function function_list() |
||
147 | |||
148 | // -------------------------------------------------------------------------- |
||
149 | |||
150 | /** |
||
151 | * Return sql to list stored procedures |
||
152 | * |
||
153 | * @return string |
||
154 | */ |
||
155 | public function procedure_list() |
||
159 | |||
160 | // -------------------------------------------------------------------------- |
||
161 | |||
162 | /** |
||
163 | * Return sql to list sequences |
||
164 | * |
||
165 | * @return NULL |
||
166 | */ |
||
167 | public function sequence_list() |
||
171 | |||
172 | // -------------------------------------------------------------------------- |
||
173 | |||
174 | /** |
||
175 | * SQL to show list of field types |
||
176 | * |
||
177 | * @return string |
||
178 | */ |
||
179 | public function type_list() |
||
183 | |||
184 | // -------------------------------------------------------------------------- |
||
185 | |||
186 | /** |
||
187 | * SQL to show infromation about columns in a table |
||
188 | * |
||
189 | * @param string $table |
||
190 | * @return string |
||
191 | */ |
||
192 | public function column_list($table) |
||
196 | |||
197 | // -------------------------------------------------------------------------- |
||
198 | |||
199 | /** |
||
200 | * Get the list of foreign keys for the current |
||
201 | * table |
||
202 | * |
||
203 | * @param string $table |
||
204 | * @return string |
||
205 | */ |
||
206 | public function fk_list($table) |
||
223 | |||
224 | // -------------------------------------------------------------------------- |
||
225 | |||
226 | /** |
||
227 | * Get the list of indexes for the current table |
||
228 | * |
||
229 | * @param string $table |
||
230 | * @return array |
||
231 | */ |
||
232 | public function index_list($table) |
||
236 | } |
||
237 | //End of mysql_sql.php |