1 | <?php |
||
36 | trait MySQLiByDanielGPstructures |
||
37 | { |
||
38 | |||
39 | use MySQLiByDanielGP; |
||
40 | |||
41 | /** |
||
42 | * Ensures table has special quoes and DOT as final char |
||
43 | * (if not empty, of course) |
||
44 | * |
||
45 | * @param string $referenceTable |
||
46 | * @return string |
||
47 | */ |
||
48 | private function correctTableWithQuotesAsFieldPrefix($referenceTable) |
||
55 | |||
56 | /** |
||
57 | * Return the list of Tables from the MySQL server |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | protected function getMySQLStatistics($filterArray = null) |
||
65 | |||
66 | /** |
||
67 | * returns a list of MySQL databases |
||
68 | * |
||
69 | * @return array |
||
70 | */ |
||
71 | protected function getMySQLactiveDatabases() |
||
75 | |||
76 | /** |
||
77 | * returns a list of active MySQL engines |
||
78 | * |
||
79 | * @return array |
||
80 | */ |
||
81 | protected function getMySQLactiveEngines() |
||
85 | |||
86 | /** |
||
87 | * returns the list of all MySQL generic informations |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | protected function getMySQLgenericInformations() |
||
98 | |||
99 | /** |
||
100 | * returns the list of all MySQL global variables |
||
101 | * |
||
102 | * @return array |
||
103 | */ |
||
104 | protected function getMySQLglobalVariables() |
||
108 | |||
109 | /** |
||
110 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | protected function getMySQLlistColumns($filterArray = null) |
||
118 | |||
119 | /** |
||
120 | * returns a list of MySQL databases (w. choice of exclude/include the system ones) |
||
121 | * |
||
122 | * @return array |
||
123 | */ |
||
124 | protected function getMySQLlistDatabases($excludeSystemDbs = true) |
||
128 | |||
129 | /** |
||
130 | * returns a list of MySQL engines (w. choice of return only the active ones) |
||
131 | * |
||
132 | * @return array |
||
133 | */ |
||
134 | protected function getMySQLlistEngines($onlyActiveOnes = true) |
||
138 | |||
139 | /** |
||
140 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
141 | * |
||
142 | * @return array |
||
143 | */ |
||
144 | protected function getMySQLlistIndexes($filterArray = null) |
||
148 | |||
149 | /** |
||
150 | * Return the list of Tables from the MySQL server |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | protected function getMySQLlistTables($filterArray = null) |
||
158 | |||
159 | /** |
||
160 | * Return the time from the MySQL server |
||
161 | * |
||
162 | * @return string |
||
163 | */ |
||
164 | protected function getMySQLserverTime() |
||
168 | |||
169 | /** |
||
170 | * Reads data from table into REQUEST super global |
||
171 | * |
||
172 | * @param string $tableName |
||
173 | * @param array $filtersArray |
||
174 | */ |
||
175 | protected function getRowDataFromTable($tableName, $filtersArray) |
||
187 | |||
188 | /** |
||
189 | * Builds an filter string from pair of key and value, where value is array |
||
190 | * |
||
191 | * @param string $key |
||
192 | * @param array $value |
||
193 | * @param string $referenceTable |
||
194 | * @return string |
||
195 | */ |
||
196 | private function setArrayLineArrayToFilter($key, $value, $referenceTable) |
||
205 | |||
206 | /** |
||
207 | * Builds an filter string from pair of key and value, none array |
||
208 | * |
||
209 | * @param string $key |
||
210 | * @param int|float|string $value |
||
211 | * @return string |
||
212 | */ |
||
213 | private function setArrayLineToFilter($key, $value) |
||
221 | |||
222 | /** |
||
223 | * Transforms an array into usable filters |
||
224 | * |
||
225 | * @param array $entryArray |
||
226 | * @param string $referenceTable |
||
227 | * @return array |
||
228 | */ |
||
229 | private function setArrayToFilterValues($entryArray, $referenceTable = '') |
||
242 | |||
243 | /** |
||
244 | * Returns maximum length for a given MySQL field |
||
245 | * |
||
246 | * @param array $fieldDetails |
||
247 | * @param boolean $outputFormated |
||
248 | * @return array |
||
249 | */ |
||
250 | protected function setFieldNumbers($fieldDetails, $outputFormated = false) |
||
262 | |||
263 | /** |
||
264 | * Establishes numbers of fields |
||
265 | * |
||
266 | * @param array $fieldDetails |
||
267 | * @return array |
||
268 | */ |
||
269 | private function setFieldSpecific($fieldDetails) |
||
280 | |||
281 | private function setFieldSpecificElse($fieldDetails) |
||
289 | |||
290 | private function setFldLmtsExact($cTp) |
||
308 | } |
||
309 |