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 global variables |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | protected function getMySQLglobalVariables() |
||
95 | |||
96 | /** |
||
97 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
98 | * |
||
99 | * @return array |
||
100 | */ |
||
101 | protected function getMySQLlistColumns($filterArray = null) |
||
105 | |||
106 | /** |
||
107 | * returns a list of MySQL databases (w. choice of exclude/include the system ones) |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | protected function getMySQLlistDatabases($excludeSystemDbs = true) |
||
115 | |||
116 | /** |
||
117 | * returns a list of MySQL engines (w. choice of return only the active ones) |
||
118 | * |
||
119 | * @return array |
||
120 | */ |
||
121 | protected function getMySQLlistEngines($onlyActiveOnes = true) |
||
125 | |||
126 | /** |
||
127 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
128 | * |
||
129 | * @return array |
||
130 | */ |
||
131 | protected function getMySQLlistIndexes($filterArray = null) |
||
135 | |||
136 | /** |
||
137 | * Return the list of Tables from the MySQL server |
||
138 | * |
||
139 | * @return string |
||
140 | */ |
||
141 | protected function getMySQLlistTables($filterArray = null) |
||
145 | |||
146 | /** |
||
147 | * Return the time from the MySQL server |
||
148 | * |
||
149 | * @return string |
||
150 | */ |
||
151 | protected function getMySQLserverTime() |
||
155 | |||
156 | /** |
||
157 | * Reads data from table into REQUEST super global |
||
158 | * |
||
159 | * @param string $tableName |
||
160 | * @param array $filtersArray |
||
161 | */ |
||
162 | protected function getRowDataFromTable($tableName, $filtersArray) |
||
174 | |||
175 | /** |
||
176 | * Builds an filter string from pair of key and value, where value is array |
||
177 | * |
||
178 | * @param string $key |
||
179 | * @param array $value |
||
180 | * @param string $referenceTable |
||
181 | * @return string |
||
182 | */ |
||
183 | private function setArrayLineArrayToFilter($key, $value, $referenceTable) |
||
192 | |||
193 | /** |
||
194 | * Builds an filter string from pair of key and value, none array |
||
195 | * |
||
196 | * @param string $key |
||
197 | * @param int|float|string $value |
||
198 | * @return string |
||
199 | */ |
||
200 | private function setArrayLineToFilter($key, $value) |
||
208 | |||
209 | /** |
||
210 | * Transforms an array into usable filters |
||
211 | * |
||
212 | * @param array $entryArray |
||
213 | * @param string $referenceTable |
||
214 | * @return array |
||
215 | */ |
||
216 | private function setArrayToFilterValues($entryArray, $referenceTable = '') |
||
229 | |||
230 | /** |
||
231 | * Returns maximum length for a given MySQL field |
||
232 | * |
||
233 | * @param array $fieldDetails |
||
234 | * @param boolean $outputFormated |
||
235 | * @return array |
||
236 | */ |
||
237 | protected function setFieldNumbers($fieldDetails, $outputFormated = false) |
||
249 | |||
250 | /** |
||
251 | * Establishes numbers of fields |
||
252 | * |
||
253 | * @param array $fieldDetails |
||
254 | * @return array |
||
255 | */ |
||
256 | private function setFieldSpecific($fieldDetails) |
||
267 | |||
268 | private function setFieldSpecificElse($fieldDetails) |
||
276 | |||
277 | private function setFldLmtsExact($cTp) |
||
295 | } |
||
296 |